java.security.cert
Interface X509Extension
public
interface
X509Extension
Public interface for the X.509 Extension.
This is used for X.509 v3 Certificates and CRL v2 (Certificate
Revocation Lists) for managing attributes assoicated with
Certificates, for managing the hierarchy of certificates,
and for managing the distribution of CRL. This extension
format is used to define private extensions.
Each extensions for a certificate or CRL must be marked
either critical or non-critical. If the certificate/CRL
system encounters a critical extension not recognized then
it must reject the certificate. A non-critical extension
may be just ignored if not recognized.
The ASN.1 definition for this class is:
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
}
Since: 1.2
Method Summary |
Set<String> | getCriticalExtensionOIDs()
Returns a set of the CRITICAL extension OIDs from the
certificate/CRL that the object implementing this interface
manages. |
byte[] | getExtensionValue(String oid)
Returns the DER encoded OCTET string for the specified
extension value identified by a OID. |
Set<String> | getNonCriticalExtensionOIDs()
Returns a set of the NON-CRITICAL extension OIDs from the
certificate/CRL that the object implementing this interface
manages. |
boolean | hasUnsupportedCriticalExtension()
Returns true if the certificate contains a critical extension
that is not supported. |
public Set<String> getCriticalExtensionOIDs()
Returns a set of the CRITICAL extension OIDs from the
certificate/CRL that the object implementing this interface
manages.
Returns: A Set containing the OIDs. If there are no CRITICAL
extensions or extensions at all this returns null.
public byte[] getExtensionValue(String oid)
Returns the DER encoded OCTET string for the specified
extension value identified by a OID. The OID is a string
of number separated by periods. Ex: 12.23.45.67
public Set<String> getNonCriticalExtensionOIDs()
Returns a set of the NON-CRITICAL extension OIDs from the
certificate/CRL that the object implementing this interface
manages.
Returns: A Set containing the OIDs. If there are no NON-CRITICAL
extensions or extensions at all this returns null.
public boolean hasUnsupportedCriticalExtension()
Returns true if the certificate contains a critical extension
that is not supported.
Returns: true if has unsupported extension, false otherwise