Methods Summary |
---|
public boolean | equals(java.lang.Object obj)
try {
if (!obj.getClass().getName().equals(this.getClass().getName())) {
return false;
}
XMLX509Certificate other = (XMLX509Certificate) obj;
/** $todo$ or should be create X509Certificates and use the equals() from the Certs */
return java.security.MessageDigest.isEqual(other.getCertificateBytes(),
this.getCertificateBytes());
} catch (XMLSecurityException ex) {
return false;
}
|
public java.lang.String | getBaseLocalName()
return Constants._TAG_X509CERTIFICATE;
|
public byte[] | getCertificateBytes()Method getCertificateBytes
return this.getBytesFromTextChild();
|
public java.security.PublicKey | getPublicKey()Method getPublicKey
X509Certificate cert = this.getX509Certificate();
if (cert != null) {
return cert.getPublicKey();
}
return null;
|
public java.security.cert.X509Certificate | getX509Certificate()Method getX509Certificate
try {
byte certbytes[] = this.getCertificateBytes();
CertificateFactory certFact =
CertificateFactory.getInstance(XMLX509Certificate.JCA_CERT_ID);
X509Certificate cert =
(X509Certificate) certFact
.generateCertificate(new ByteArrayInputStream(certbytes));
if (cert != null) {
return cert;
}
return null;
} catch (CertificateException ex) {
throw new XMLSecurityException("empty", ex);
}
|