kz.gamma.asn1.x509
Class Extensions

java.lang.Object
  extended by kz.gamma.asn1.ASN1Encodable
      extended by kz.gamma.asn1.x509.Extensions
All Implemented Interfaces:
DEREncodable

public class Extensions
extends ASN1Encodable


Field Summary
private  java.util.Hashtable extensions
           
private  java.util.Vector ordering
           
 
Fields inherited from class kz.gamma.asn1.ASN1Encodable
BER, DER
 
Constructor Summary
private Extensions(ASN1Sequence seq)
          Constructor from ASN1Sequence.
  Extensions(Extension extension)
          Base Constructor
  Extensions(Extension[] extensions)
          Base Constructor
 
Method Summary
 boolean equivalent(Extensions other)
           
 DERObjectIdentifier[] getCriticalExtensionOIDs()
           
 Extension getExtension(DERObjectIdentifier oid)
          return the extension represented by the object identifier passed in.
 DERObjectIdentifier[] getExtensionOIDs()
           
private  DERObjectIdentifier[] getExtensionOIDs(boolean isCritical)
           
 ASN1Encodable getExtensionParsedValue(DERObjectIdentifier oid)
          return the parsed value of the extension represented by the object identifier passed in.
static Extensions getInstance(ASN1TaggedObject obj, boolean explicit)
           
static Extensions getInstance(java.lang.Object obj)
           
 DERObjectIdentifier[] getNonCriticalExtensionOIDs()
           
 java.util.Enumeration oids()
          return an Enumeration of the extension field's object ids.
 DERObject toASN1Object()
           Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension Extension ::= SEQUENCE { extnId EXTENSION.
private  DERObjectIdentifier[] toOidArray(java.util.Vector oidVec)
           
 
Methods inherited from class kz.gamma.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extensions

private java.util.Hashtable extensions

ordering

private java.util.Vector ordering
Constructor Detail

Extensions

private Extensions(ASN1Sequence seq)
Constructor from ASN1Sequence.

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


Extensions

public Extensions(Extension extension)
Base Constructor

Parameters:
extension - a single extension.

Extensions

public Extensions(Extension[] extensions)
Base Constructor

Parameters:
extensions - an array of extensions.
Method Detail

getInstance

public static Extensions getInstance(ASN1TaggedObject obj,
                                     boolean explicit)

getInstance

public static Extensions getInstance(java.lang.Object obj)

oids

public java.util.Enumeration oids()
return an Enumeration of the extension field's object ids.


getExtension

public Extension getExtension(DERObjectIdentifier oid)
return the extension represented by the object identifier passed in.

Returns:
the extension if it's present, null otherwise.

getExtensionParsedValue

public ASN1Encodable getExtensionParsedValue(DERObjectIdentifier oid)
return the parsed value of the extension represented by the object identifier passed in.

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

toASN1Object

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

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

Specified by:
toASN1Object in class ASN1Encodable

equivalent

public boolean equivalent(Extensions other)

getExtensionOIDs

public DERObjectIdentifier[] getExtensionOIDs()

getNonCriticalExtensionOIDs

public DERObjectIdentifier[] getNonCriticalExtensionOIDs()

getCriticalExtensionOIDs

public DERObjectIdentifier[] getCriticalExtensionOIDs()

getExtensionOIDs

private DERObjectIdentifier[] getExtensionOIDs(boolean isCritical)

toOidArray

private DERObjectIdentifier[] toOidArray(java.util.Vector oidVec)


Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.