Top Fields Constructors Methods
org.bouncycastle.asn1.x509

public Class Extensions

extends ASN1Object
Class Inheritance
Imports
java.util.Enumeration, .Hashtable, .Vector, org.bouncycastle.asn1.ASN1Encodable, .ASN1EncodableVector, .ASN1Object, .ASN1ObjectIdentifier, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .DERSequence

Field Summary

Modifier and TypeField and Description
private Hashtable<K, V>
private Vector<E>

Constructor Summary

AccessConstructor and Description
private
Extensions(ASN1Sequence seq)

Constructor from ASN1Sequence.

public
Extensions(Extension
a single extension.
extension
)

Base Constructor

public
Extensions(Extension[]
an array of extensions.
extensions
)

Base Constructor

Method Summary

Modifier and TypeMethod and Description
public boolean
public ASN1ObjectIdentifier[]
public Extension

Returns:

the extension if it's present, null otherwise.
getExtension
(ASN1ObjectIdentifier oid)

return the extension represented by the object identifier passed in.

public ASN1ObjectIdentifier[]
private ASN1ObjectIdentifier[]
getExtensionOIDs(boolean isCritical)

public ASN1Encodable

Returns:

the parsed value of the extension if it's present, null otherwise.
getExtensionParsedValue
(ASN1ObjectIdentifier oid)

return the parsed value of the extension represented by the object identifier passed in.

public static Extensions
getInstance(ASN1TaggedObject obj, boolean explicit)

public static Extensions
public ASN1ObjectIdentifier[]
public Enumeration<E>
oids()

return an Enumeration of the extension field's object ids.

public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

    Extensions        ::=   SEQUENCE SIZE (1..MAX) OF Extension

    Extension         ::=   SEQUENCE {
       extnId            EXTENSION.
private ASN1ObjectIdentifier[]
toOidArray(Vector<E> oidVec)

Inherited from org.bouncycastle.asn1.ASN1Object:
equalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

extensionsback to summary
private Hashtable<K, V> extensions
orderingback to summary
private Vector<E> ordering

Constructor Detail

Extensionsback to summary
private Extensions(ASN1Sequence seq)

Constructor from ASN1Sequence.

The extensions are a list of constructed sequences, either with (OID, OctetString) or (OID, Boolean, OctetString)

Extensionsback to summary
public Extensions(Extension extension)

Base Constructor

Parameters
extension:Extension

a single extension.

Extensionsback to summary
public Extensions(Extension[] extensions)

Base Constructor

Parameters
extensions:Extension[]

an array of extensions.

Method Detail

equivalentback to summary
public boolean equivalent(Extensions other)
getCriticalExtensionOIDsback to summary
public ASN1ObjectIdentifier[] getCriticalExtensionOIDs()
getExtensionback to summary
public Extension getExtension(ASN1ObjectIdentifier oid)

return the extension represented by the object identifier passed in.

Returns:Extension

the extension if it's present, null otherwise.

getExtensionOIDsback to summary
public ASN1ObjectIdentifier[] getExtensionOIDs()
getExtensionOIDsback to summary
private ASN1ObjectIdentifier[] getExtensionOIDs(boolean isCritical)
getExtensionParsedValueback to summary
public ASN1Encodable getExtensionParsedValue(ASN1ObjectIdentifier oid)

return the parsed value of the extension represented by the object identifier passed in.

Returns:ASN1Encodable

the parsed value of the extension if it's present, null otherwise.

getInstanceback to summary
public static Extensions getInstance(ASN1TaggedObject obj, boolean explicit)
getInstanceback to summary
public static Extensions getInstance(Object obj)
getNonCriticalExtensionOIDsback to summary
public ASN1ObjectIdentifier[] getNonCriticalExtensionOIDs()
oidsback to summary
public Enumeration<E> oids()

return an Enumeration of the extension field's object ids.

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

    Extensions        ::=   SEQUENCE SIZE (1..MAX) OF Extension

    Extension         ::=   SEQUENCE {
       extnId            EXTENSION.&id ({ExtensionSet}),
       critical          BOOLEAN DEFAULT FALSE,
       extnValue         OCTET STRING }
Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

a primitive representation of this object.

toOidArrayback to summary
private ASN1ObjectIdentifier[] toOidArray(Vector<E> oidVec)