org.gudy.bouncycastle.asn1.x509
Class X509Extensions

java.lang.Object
  extended by org.gudy.bouncycastle.asn1.ASN1Encodable
      extended by org.gudy.bouncycastle.asn1.x509.X509Extensions
All Implemented Interfaces:
DEREncodable

public class X509Extensions
extends ASN1Encodable


Field Summary
static DERObjectIdentifier AuditIdentity
          Audit identity extension in attribute certificates.
static DERObjectIdentifier AuthorityInfoAccess
          Authority Info Access
static DERObjectIdentifier AuthorityKeyIdentifier
          Authority Key Identifier
static DERObjectIdentifier BasicConstraints
          Basic Constraints
static DERObjectIdentifier BiometricInfo
          BiometricInfo
static DERObjectIdentifier CertificateIssuer
          Certificate Issuer
static DERObjectIdentifier CertificatePolicies
          Certificate Policies
static DERObjectIdentifier CRLDistributionPoints
          CRL Distribution Points
static DERObjectIdentifier CRLNumber
          CRL Number
static DERObjectIdentifier DeltaCRLIndicator
          Delta CRL indicator
static DERObjectIdentifier ExtendedKeyUsage
          Extended Key Usage
static DERObjectIdentifier FreshestCRL
          Freshest CRL
static DERObjectIdentifier InhibitAnyPolicy
          Inhibit Any Policy
static DERObjectIdentifier InstructionCode
          Hold Instruction Code
static DERObjectIdentifier InvalidityDate
          Invalidity Date
static DERObjectIdentifier IssuerAlternativeName
          Issuer Alternative Name
static DERObjectIdentifier IssuingDistributionPoint
          Issuing Distribution Point
static DERObjectIdentifier KeyUsage
          Key Usage
static DERObjectIdentifier LogoType
          Logo Type
static DERObjectIdentifier NameConstraints
          Name Constraints
static DERObjectIdentifier NoRevAvail
          NoRevAvail extension in attribute certificates.
static DERObjectIdentifier PolicyConstraints
          Policy Constraints
static DERObjectIdentifier PolicyMappings
          Policy Mappings
static DERObjectIdentifier PrivateKeyUsagePeriod
          Private Key Usage Period
static DERObjectIdentifier QCStatements
          QCStatements
static DERObjectIdentifier ReasonCode
          Reason code
static DERObjectIdentifier SubjectAlternativeName
          Subject Alternative Name
static DERObjectIdentifier SubjectDirectoryAttributes
          Subject Directory Attributes
static DERObjectIdentifier SubjectInfoAccess
          Subject Info Access
static DERObjectIdentifier SubjectKeyIdentifier
          Subject Key Identifier
static DERObjectIdentifier TargetInformation
          TargetInformation extension in attribute certificates.
 
Fields inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
BER, DER
 
Constructor Summary
X509Extensions(ASN1Sequence seq)
          Constructor from ASN1Sequence.
X509Extensions(Hashtable extensions)
          constructor from a table of extensions.
X509Extensions(Vector ordering, Hashtable extensions)
          Constructor from a table of extensions with ordering.
X509Extensions(Vector objectIDs, Vector values)
          Constructor from two vectors
 
Method Summary
 boolean equivalent(X509Extensions other)
           
 X509Extension getExtension(DERObjectIdentifier oid)
          return the extension represented by the object identifier passed in.
static X509Extensions getInstance(ASN1TaggedObject obj, boolean explicit)
           
static X509Extensions getInstance(Object obj)
           
 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.&id ({ExtensionSet}), critical BOOLEAN DEFAULT FALSE, extnValue OCTET STRING }
 
Methods inherited from class org.gudy.bouncycastle.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

SubjectDirectoryAttributes

public static final DERObjectIdentifier SubjectDirectoryAttributes
Subject Directory Attributes


SubjectKeyIdentifier

public static final DERObjectIdentifier SubjectKeyIdentifier
Subject Key Identifier


KeyUsage

public static final DERObjectIdentifier KeyUsage
Key Usage


PrivateKeyUsagePeriod

public static final DERObjectIdentifier PrivateKeyUsagePeriod
Private Key Usage Period


SubjectAlternativeName

public static final DERObjectIdentifier SubjectAlternativeName
Subject Alternative Name


IssuerAlternativeName

public static final DERObjectIdentifier IssuerAlternativeName
Issuer Alternative Name


BasicConstraints

public static final DERObjectIdentifier BasicConstraints
Basic Constraints


CRLNumber

public static final DERObjectIdentifier CRLNumber
CRL Number


ReasonCode

public static final DERObjectIdentifier ReasonCode
Reason code


InstructionCode

public static final DERObjectIdentifier InstructionCode
Hold Instruction Code


InvalidityDate

public static final DERObjectIdentifier InvalidityDate
Invalidity Date


DeltaCRLIndicator

public static final DERObjectIdentifier DeltaCRLIndicator
Delta CRL indicator


IssuingDistributionPoint

public static final DERObjectIdentifier IssuingDistributionPoint
Issuing Distribution Point


CertificateIssuer

public static final DERObjectIdentifier CertificateIssuer
Certificate Issuer


NameConstraints

public static final DERObjectIdentifier NameConstraints
Name Constraints


CRLDistributionPoints

public static final DERObjectIdentifier CRLDistributionPoints
CRL Distribution Points


CertificatePolicies

public static final DERObjectIdentifier CertificatePolicies
Certificate Policies


PolicyMappings

public static final DERObjectIdentifier PolicyMappings
Policy Mappings


AuthorityKeyIdentifier

public static final DERObjectIdentifier AuthorityKeyIdentifier
Authority Key Identifier


PolicyConstraints

public static final DERObjectIdentifier PolicyConstraints
Policy Constraints


ExtendedKeyUsage

public static final DERObjectIdentifier ExtendedKeyUsage
Extended Key Usage


FreshestCRL

public static final DERObjectIdentifier FreshestCRL
Freshest CRL


InhibitAnyPolicy

public static final DERObjectIdentifier InhibitAnyPolicy
Inhibit Any Policy


AuthorityInfoAccess

public static final DERObjectIdentifier AuthorityInfoAccess
Authority Info Access


SubjectInfoAccess

public static final DERObjectIdentifier SubjectInfoAccess
Subject Info Access


LogoType

public static final DERObjectIdentifier LogoType
Logo Type


BiometricInfo

public static final DERObjectIdentifier BiometricInfo
BiometricInfo


QCStatements

public static final DERObjectIdentifier QCStatements
QCStatements


AuditIdentity

public static final DERObjectIdentifier AuditIdentity
Audit identity extension in attribute certificates.


NoRevAvail

public static final DERObjectIdentifier NoRevAvail
NoRevAvail extension in attribute certificates.


TargetInformation

public static final DERObjectIdentifier TargetInformation
TargetInformation extension in attribute certificates.

Constructor Detail

X509Extensions

public X509Extensions(ASN1Sequence seq)
Constructor from ASN1Sequence. the extensions are a list of constructed sequences, either with (OID, OctetString) or (OID, Boolean, OctetString)


X509Extensions

public X509Extensions(Hashtable extensions)
constructor from a table of extensions.

it's is assumed the table contains OID/String pairs.


X509Extensions

public X509Extensions(Vector ordering,
                      Hashtable extensions)
Constructor from a table of extensions with ordering.

It's is assumed the table contains OID/String pairs.


X509Extensions

public X509Extensions(Vector objectIDs,
                      Vector values)
Constructor from two vectors

Parameters:
objectIDs - a vector of the object identifiers.
values - a vector of the extension values.
Method Detail

getInstance

public static X509Extensions getInstance(ASN1TaggedObject obj,
                                         boolean explicit)

getInstance

public static X509Extensions getInstance(Object obj)

oids

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


getExtension

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

Returns:
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(X509Extensions other)