|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.crypt.x509.ExtensionReader
public final class ExtensionReader
Reads X.509v3 extended properties from an X509Certificate object. The
available properties are described in section 4.2 of RFC 2459,
http://www.faqs.org/rfcs/rfc2459.html.
| Constructor Summary | |
|---|---|
ExtensionReader(X509Certificate cert)
Creates a new instance that can read extension fields from the given X.509 certificate. |
|
| Method Summary | |
|---|---|
Object |
read(ExtensionType extension)
Reads the value of the given certificate extension field. |
Object |
read(String extensionOidOrName)
Reads the value of the extension given by OID or name as defined in section 4.2 of RFC 2459. |
Map<ExtensionType,Object> |
readAll()
Attempts to read all extensions defined in section 4.2 of RFC 2459 and returns a map of all extensions defined on the certificate. |
AccessDescriptionList |
readAuthorityInformationAccess()
Reads the value of the AuthorityInformationAccess extension
field of the certificate. |
AuthorityKeyIdentifier |
readAuthorityKeyIdentifier()
Reads the value of the AuthorityKeyIdentifier extension field
of the certificate. |
BasicConstraints |
readBasicConstraints()
Reads the value of the BasicConstraints extension field of the
certificate. |
PolicyInformationList |
readCertificatePolicies()
Reads the value of the CertificatePolicies extension field of
the certificate. |
DistributionPointList |
readCRLDistributionPoints()
Reads the value of the CRLDistributionPoints extension field
of the certificate. |
KeyPurposeIdList |
readExtendedKeyUsage()
Reads the value of the ExtendedKeyUsage extension field of the
certificate. |
GeneralNameList |
readIssuerAlternativeName()
Reads the value of the IssuerAlternativeName extension field
of the certificate. |
KeyUsage |
readKeyUsage()
Reads the value of the KeyUsage extension field of the
certificate. |
GeneralNameList |
readSubjectAlternativeName()
Reads the value of the SubjectAlternativeName extension field of the certificate. |
KeyIdentifier |
readSubjectKeyIdentifier()
Reads the value of the SubjectKeyIdentifier extension field of
the certificate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExtensionReader(X509Certificate cert)
cert - Certificate to read.| Method Detail |
|---|
public Object read(String extensionOidOrName)
throws CryptException
extensionOidOrName - OID or extension name, e.g. 2.5.29.14 or
SubjectKeyIdentifier. In the case of extension name, the name is
case-sensitive and follows the conventions in RFC 2459.
CryptException - On errors reading encoded certificate extension
field data.
IllegalArgumentException - On invalid OID or extension name.
public Object read(ExtensionType extension)
throws CryptException
extension - Extension to read from certificate.
edu.vt.middleware.crypt.x509.types package containing the data in
the extension field.
CryptException - On errors reading encoded certificate extension
field data.
public GeneralNameList readSubjectAlternativeName()
throws CryptException
CryptException - On errors reading encoded certificate extension
field data.
public GeneralNameList readIssuerAlternativeName()
throws CryptException
IssuerAlternativeName extension field
of the certificate.
CryptException - On errors reading encoded certificate extension
field data.
public BasicConstraints readBasicConstraints()
throws CryptException
BasicConstraints extension field of the
certificate.
CryptException - On errors reading encoded certificate extension
field data.
public PolicyInformationList readCertificatePolicies()
throws CryptException
CertificatePolicies extension field of
the certificate.
CryptException - On errors reading encoded certificate extension
field data.
public KeyIdentifier readSubjectKeyIdentifier()
throws CryptException
SubjectKeyIdentifier extension field of
the certificate.
CryptException - On errors reading encoded certificate extension
field data.
public AuthorityKeyIdentifier readAuthorityKeyIdentifier()
throws CryptException
AuthorityKeyIdentifier extension field
of the certificate.
CryptException - On errors reading encoded certificate extension
field data.
public KeyUsage readKeyUsage()
throws CryptException
KeyUsage extension field of the
certificate.
CryptException - On errors reading encoded certificate extension
field data.
public KeyPurposeIdList readExtendedKeyUsage()
throws CryptException
ExtendedKeyUsage extension field of the
certificate.
CryptException - On errors reading encoded certificate extension
field data.
public DistributionPointList readCRLDistributionPoints()
throws CryptException
CRLDistributionPoints extension field
of the certificate.
CryptException - On errors reading encoded certificate extension
field data.
public AccessDescriptionList readAuthorityInformationAccess()
throws CryptException
AuthorityInformationAccess extension
field of the certificate.
CryptException - On errors reading encoded certificate extension
field data.
public Map<ExtensionType,Object> readAll()
throws CryptException
CryptException - On errors reading encoded certificate extension
field data.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||