@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class BasicConstraintsExtension extends X509CertificateExtension
BasicConstraints ::= SEQUENCE { cA BOOLEAN DEFAULT FALSE, pathLenConstraint INTEGER (0..MAX) OPTIONAL }
Modifier and Type | Field and Description |
---|---|
static OID |
BASIC_CONSTRAINTS_OID
The OID (2.5.29.19) for basic constraints extensions.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExtensionName()
Retrieves the name for this extension.
|
java.lang.Integer |
getPathLengthConstraint()
Retrieves the path length constraint for the associated certificate, if
defined.
|
boolean |
isCA()
Indicates whether the associated certificate is a certification authority
(that is, can be used to sign other certificates).
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this certificate extension to the
provided buffer.
|
getOID, getValue, isCritical, toString
@NotNull public static final OID BASIC_CONSTRAINTS_OID
public boolean isCA()
true
if the associated certificate is a certification
authority, or false
if not.@Nullable public java.lang.Integer getPathLengthConstraint()
isCA()
returns true
and this method returns
a non-null
value, then any certificate chain that includes the
associated certificate should not be trusted if the chain contains more
than this number of certificates.null
if no path length constraint is defined.@NotNull public java.lang.String getExtensionName()
getExtensionName
in class X509CertificateExtension
public void toString(@NotNull java.lang.StringBuilder buffer)
toString
in class X509CertificateExtension
buffer
- The buffer to which the information should be appended.