public final class Extensions extends Object
Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
| Modifier and Type | Field and Description |
|---|---|
static ASN1Type |
ASN1
Custom X.509 Extensions decoder.
|
| Constructor and Description |
|---|
Extensions()
Constructs an object representing the value of Extensions.
|
Extensions(List<Extension> extensions) |
| Modifier and Type | Method and Description |
|---|---|
void |
dumpValue(StringBuilder sb,
String prefix) |
boolean |
equals(Object other)
Compares this instance with the specified object and indicates if they
are equal.
|
Set<String> |
getCriticalExtensions()
Returns the list of critical extensions.
|
byte[] |
getEncoded()
Returns ASN.1 encoded form of this X.509 Extensions value.
|
Extension |
getExtensionByOID(String oid)
Returns the values of extensions.
|
Set<String> |
getNonCriticalExtensions()
Returns the list of critical extensions.
|
int |
hashCode()
Returns an integer hash code for this object.
|
boolean |
hasUnsupportedCritical() |
int |
size() |
int |
valueOfBasicConstraints()
Returns the value of Basic Constraints Extension (OID = 2.5.29.19).
|
X500Principal |
valueOfCertificateIssuerExtension()
Returns the value of Certificate Issuer Extension (OID = 2.5.29.29).
|
List<String> |
valueOfExtendedKeyUsage()
Returns the value of Extended Key Usage extension (OID == 2.5.29.37).
|
Collection<List<?>> |
valueOfIssuerAlternativeName()
Returns the value of Issuer Alternative Name Extension (OID = 2.5.29.18).
|
boolean[] |
valueOfKeyUsage()
Returns the value of Key Usage extension (OID == 2.5.29.15).
|
Collection<List<?>> |
valueOfSubjectAlternativeName()
Returns the value of Subject Alternative Name (OID = 2.5.29.17).
|
public static final ASN1Type ASN1
public Extensions()
public int size()
public Set<String> getCriticalExtensions()
public Set<String> getNonCriticalExtensions()
public boolean hasUnsupportedCritical()
public boolean[] valueOfKeyUsage()
id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
KeyUsage ::= BIT STRING {
digitalSignature (0),
nonRepudiation (1),
keyEncipherment (2),
dataEncipherment (3),
keyAgreement (4),
keyCertSign (5),
cRLSign (6),
encipherOnly (7),
decipherOnly (8)
}
(as specified in RFC 3280)public List<String> valueOfExtendedKeyUsage() throws IOException
id-ce-extKeyUsage OBJECT IDENTIFIER ::= { id-ce 37 }
ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
KeyPurposeId ::= OBJECT IDENTIFIER
(as specified in RFC 3280)IOException - if extension was incorrectly encoded.public int valueOfBasicConstraints()
id-ce-basicConstraints OBJECT IDENTIFIER ::= { id-ce 19 }
BasicConstraints ::= SEQUENCE {
cA BOOLEAN DEFAULT FALSE,
pathLenConstraint INTEGER (0..MAX) OPTIONAL
}
(as specified in RFC 3280)public Collection<List<?>> valueOfSubjectAlternativeName() throws IOException
id-ce-subjectAltName OBJECT IDENTIFIER ::= { id-ce 17 }
SubjectAltName ::= GeneralNames
(as specified in RFC 3280)IOExceptionpublic Collection<List<?>> valueOfIssuerAlternativeName() throws IOException
id-ce-issuerAltName OBJECT IDENTIFIER ::= { id-ce 18 }
IssuerAltName ::= GeneralNames
(as specified in RFC 3280)IOExceptionpublic X500Principal valueOfCertificateIssuerExtension() throws IOException
id-ce-certificateIssuer OBJECT IDENTIFIER ::= { id-ce 29 }
certificateIssuer ::= GeneralNames
(as specified in RFC 3280)IOExceptionpublic byte[] getEncoded()
public boolean equals(Object other)
Objecto must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true only if this ==
o. See Writing a correct
equals method
if you intend implementing your own equals method.
The general contract for the equals and Object.hashCode() methods is that if equals returns true for
any two objects, then hashCode() must return the same value for
these objects. This means that subclasses of Object usually
override either both methods or neither of them.
equals in class Objectother - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()public int hashCode()
ObjectObject.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ObjectObject.equals(java.lang.Object)public void dumpValue(StringBuilder sb, String prefix)