X509Extension

Interface for an X.509 extension.

<p>The extensions defined for X.509 v3 {@link X509Certificate Certificates} and v2 {@link X509CRL CRLs} (Certificate Revocation Lists) provide methods for associating additional attributes with users or public keys, for managing the certification hierarchy, and for managing CRL distribution. The X.509 extensions format also allows communities to define private extensions to carry information unique to those communities.

<p>Each extension in a certificate/CRL may be designated as critical or non-critical. A certificate/CRL-using system (an application validating a certificate/CRL) must reject the certificate/CRL if it encounters a critical extension it does not recognize. A non-critical extension may be ignored if it is not recognized. <p> The ASN.1 definition for this is: <pre> Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension

Extension ::= SEQUENCE { extnId OBJECT IDENTIFIER, critical BOOLEAN DEFAULT FALSE, extnValue OCTET STRING -- contains a DER encoding of a value -- of the type registered for use with -- the extnId object identifier value } </pre> Since not all extensions are known, the {@code getExtensionValue} method returns the DER-encoded OCTET STRING of the extension value (i.e., the {@code extnValue}). This can then be handled by a <em>Class</em> that understands the extension.

@author Hemma Prafullchandra

Members

Functions

getCriticalExtensionOIDs
Set!string getCriticalExtensionOIDs()

Gets a Set of the OID strings for the extension(s) marked CRITICAL in the certificate/CRL managed by the object implementing this interface.

getExtensionValue
byte[] getExtensionValue(string oid)

Gets the DER-encoded OCTET string for the extension value (<em>extnValue</em>) identified by the passed-in {@code oid} string. The {@code oid} string is represented by a set of nonnegative whole numbers separated by periods.

getNonCriticalExtensionOIDs
Set!string getNonCriticalExtensionOIDs()

Gets a Set of the OID strings for the extension(s) marked NON-CRITICAL in the certificate/CRL managed by the object implementing this interface.

hasUnsupportedCriticalExtension
bool hasUnsupportedCriticalExtension()

Check if there is a critical extension that is not supported.

Meta