Package com.unboundid.util.ssl.cert
Class X509CertificateExtension
- java.lang.Object
-
- com.unboundid.util.ssl.cert.X509CertificateExtension
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AuthorityKeyIdentifierExtension
,BasicConstraintsExtension
,CRLDistributionPointsExtension
,ExtendedKeyUsageExtension
,GeneralAlternativeNameExtension
,KeyUsageExtension
,SubjectKeyIdentifierExtension
@NotExtensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class X509CertificateExtension extends java.lang.Object implements java.io.Serializable
This class represents a data structure that holds information about an X.509 certificate extension.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description X509CertificateExtension(OID oid, boolean isCritical, byte[] value)
Creates a new X.509 certificate extension with the provided information.protected
X509CertificateExtension(X509CertificateExtension extension)
Creates a new X.509 certificate extension that wraps the provided extension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getExtensionName()
Retrieves the name for this extension.OID
getOID()
Retrieves the OID for this extension.byte[]
getValue()
Retrieves the value for this extension.boolean
isCritical()
Indicates whether this extension is considered critical.java.lang.String
toString()
Retrieves a string representation of this extension.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this certificate extension to the provided buffer.
-
-
-
Constructor Detail
-
X509CertificateExtension
protected X509CertificateExtension(@NotNull X509CertificateExtension extension)
Creates a new X.509 certificate extension that wraps the provided extension.- Parameters:
extension
- The extension to wrap.
-
X509CertificateExtension
public X509CertificateExtension(@NotNull OID oid, boolean isCritical, @NotNull byte[] value)
Creates a new X.509 certificate extension with the provided information.- Parameters:
oid
- The OID for this extension.isCritical
- Indicates whether this extension is considered critical.value
- The value for this extension.
-
-
Method Detail
-
getOID
@NotNull public final OID getOID()
Retrieves the OID for this extension.- Returns:
- The OID for this extension.
-
isCritical
public final boolean isCritical()
Indicates whether this extension is considered critical.- Returns:
true
if this extension is considered critical, orfalse
if not.
-
getValue
@NotNull public final byte[] getValue()
Retrieves the value for this extension.- Returns:
- The value for this extension.
-
getExtensionName
@NotNull public java.lang.String getExtensionName()
Retrieves the name for this extension.- Returns:
- The name for this extension.
-
toString
@NotNull public final java.lang.String toString()
Retrieves a string representation of this extension.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this extension.
-
-