in.defaultReadObject();
try {
byte b[] = (byte []) in.readObject();
// In 1.2 beta 4, we must use a certificate factory for this
// X509Certificate x509 = X509Certificate.getInstance(
// new ByteArrayInputStream(b));
// certificate = x509;
CertificateFactory cf = CertificateFactory.getInstance("X509");
certificate = cf.generateCertificate(new ByteArrayInputStream(b));
} catch (CertificateException ce) {
throw new IOException("Can't de-serialize object " + ce);
}