Package java.security.cert
Interface X509Extension
- All Known Subinterfaces:
X509AttributeCertificate
- All Known Implementing Classes:
OpenSSLX509Certificate,OpenSSLX509CRL,OpenSSLX509CRLEntry,X509Certificate,X509CertificateObject,X509CertImpl,X509CRL,X509CRLEntry,X509CRLEntryImpl,X509CRLEntryObject,X509CRLImpl,X509CRLObject,X509V2AttributeCertificate
public interface X509Extension
The interface specifying an X.509 Certificate or CRL extension.
-
Method Summary
Modifier and Type Method Description Set<String>getCriticalExtensionOIDs()Returns the set of OIDs of the extension(s) marked as CRITICAL, that this implementation manages.byte[]getExtensionValue(String oid)Returns the extension value as DER-encoded OCTET string for the specified OID.Set<String>getNonCriticalExtensionOIDs()Returns the set of OIDs of the extension(s) marked as NON-CRITICAL, that this implementation manages.booleanhasUnsupportedCriticalExtension()Returns whether this instance has an extension marked as CRITICAL that it cannot support.
-
Method Details
-
getCriticalExtensionOIDs
Returns the set of OIDs of the extension(s) marked as CRITICAL, that this implementation manages.- Returns:
- the set of extension OIDs marked as CRITIAL, an empty set if none
are marked as CRITICAL, or
nullif no extensions are present.
-
getExtensionValue
Returns the extension value as DER-encoded OCTET string for the specified OID.- Parameters:
oid- the object identifier to get the extension value for.- Returns:
- the extension value as DER-encoded OCTET string, or
nullif no extension for the specified OID can be found.
-
getNonCriticalExtensionOIDs
Returns the set of OIDs of the extension(s) marked as NON-CRITICAL, that this implementation manages.- Returns:
- the set of extension OIDs marked as NON-CRITIAL, an empty set if
none are marked as NON-.CRITICAL, or
nullif no extensions are present.
-
hasUnsupportedCriticalExtension
boolean hasUnsupportedCriticalExtension()Returns whether this instance has an extension marked as CRITICAL that it cannot support.- Returns:
trueif an unsupported CRITICAL extension is present,falseotherwise.
-