public final class ExtensionReader
extends java.lang.Object
X509Certificate object. The available properties
are described in section 4.2 of RFC 2459, http://www.faqs.org/rfcs/rfc2459.html.| Modifier and Type | Field and Description |
|---|---|
private java.security.cert.X509Certificate |
certificate
The X509Certificate whose extension fields will be read.
|
| Constructor and Description |
|---|
ExtensionReader(java.security.cert.X509Certificate cert)
Creates a new instance that can read extension fields from the given X.509 certificate.
|
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.asn1.ASN1Encodable |
read(ExtensionType extension)
Reads the value of the given certificate extension field.
|
org.bouncycastle.asn1.ASN1Encodable |
read(java.lang.String extensionOidOrName)
Reads the value of the extension given by OID or name as defined in section 4.2 of RFC 2459.
|
java.util.List<org.bouncycastle.asn1.x509.AccessDescription> |
readAuthorityInformationAccess()
Reads the value of the
AuthorityInformationAccess extension field of the certificate. |
org.bouncycastle.asn1.x509.AuthorityKeyIdentifier |
readAuthorityKeyIdentifier()
Reads the value of the
AuthorityKeyIdentifier extension field of the certificate. |
org.bouncycastle.asn1.x509.BasicConstraints |
readBasicConstraints()
Reads the value of the
BasicConstraints extension field of the certificate. |
java.util.List<org.bouncycastle.asn1.x509.PolicyInformation> |
readCertificatePolicies()
Reads the value of the
CertificatePolicies extension field of the certificate. |
java.util.List<org.bouncycastle.asn1.x509.DistributionPoint> |
readCRLDistributionPoints()
Reads the value of the
CRLDistributionPoints extension field of the certificate. |
java.util.List<org.bouncycastle.asn1.x509.KeyPurposeId> |
readExtendedKeyUsage()
Reads the value of the
ExtendedKeyUsage extension field of the certificate. |
org.bouncycastle.asn1.x509.GeneralNames |
readIssuerAlternativeName()
Reads the value of the
IssuerAlternativeName extension field of the certificate. |
org.bouncycastle.asn1.x509.KeyUsage |
readKeyUsage()
Reads the value of the
KeyUsage extension field of the certificate. |
org.bouncycastle.asn1.x509.GeneralNames |
readSubjectAlternativeName()
Reads the value of the SubjectAlternativeName extension field of the certificate.
|
org.bouncycastle.asn1.x509.SubjectKeyIdentifier |
readSubjectKeyIdentifier()
Reads the value of the
SubjectKeyIdentifier extension field of the certificate. |
private final java.security.cert.X509Certificate certificate
public ExtensionReader(java.security.cert.X509Certificate cert)
cert - Certificate to read.public org.bouncycastle.asn1.ASN1Encodable read(java.lang.String extensionOidOrName)
throws EncodingException
extensionOidOrName - OID or extension name, e.g. 2.5.29.14 orSubjectK eyIdentifier. In the case of extension
name, the name is case-sensitive and follows the conventions in RFC 2459.EncodingException - On certificate field parse errors.public org.bouncycastle.asn1.ASN1Encodable read(ExtensionType extension)
extension - Extension to read from certificate.EncodingException - On certificate field parse errors.public org.bouncycastle.asn1.x509.GeneralNames readSubjectAlternativeName()
throws EncodingException
EncodingException - On certificate field parse errors.public org.bouncycastle.asn1.x509.GeneralNames readIssuerAlternativeName()
throws EncodingException
IssuerAlternativeName extension field of the certificate.EncodingException - On certificate field parse errors.public org.bouncycastle.asn1.x509.BasicConstraints readBasicConstraints()
throws EncodingException
BasicConstraints extension field of the certificate.EncodingException - On certificate field parse errors.public java.util.List<org.bouncycastle.asn1.x509.PolicyInformation> readCertificatePolicies()
throws EncodingException
CertificatePolicies extension field of the certificate.EncodingException - On certificate field parse errors.public org.bouncycastle.asn1.x509.SubjectKeyIdentifier readSubjectKeyIdentifier()
throws EncodingException
SubjectKeyIdentifier extension field of the certificate.EncodingException - On certificate field parse errors.public org.bouncycastle.asn1.x509.AuthorityKeyIdentifier readAuthorityKeyIdentifier()
throws EncodingException
AuthorityKeyIdentifier extension field of the certificate.EncodingException - On certificate field parse errors.public org.bouncycastle.asn1.x509.KeyUsage readKeyUsage()
throws EncodingException
KeyUsage extension field of the certificate.EncodingException - On certificate field parse errors.public java.util.List<org.bouncycastle.asn1.x509.KeyPurposeId> readExtendedKeyUsage()
throws EncodingException
ExtendedKeyUsage extension field of the certificate.EncodingException - On certificate field parse errors.public java.util.List<org.bouncycastle.asn1.x509.DistributionPoint> readCRLDistributionPoints()
throws EncodingException
CRLDistributionPoints extension field of the certificate.EncodingException - On certificate field parse errors.public java.util.List<org.bouncycastle.asn1.x509.AccessDescription> readAuthorityInformationAccess()
throws EncodingException
AuthorityInformationAccess extension field of the certificate.EncodingException - On certificate field parse errors.