codec.x509.extensions
Class AuthorityKeyIdentifierExtension

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--codec.asn1.ASN1AbstractCollection
                          |
                          +--codec.asn1.ASN1Sequence
                                |
                                +--codec.x509.X509Extension
                                      |
                                      +--codec.x509.extensions.AuthorityKeyIdentifierExtension
All Implemented Interfaces:
ASN1Collection, ASN1Type, Cloneable, Collection, Externalizable, List, Serializable, X509Extension

public class AuthorityKeyIdentifierExtension
extends X509Extension

id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 35 } AuthorityKeyIdentifier ::= SEQUENCE { keyIdentifier [0] IMPLICIT KeyIdentifier OPTIONAL, authorityCertIssuer [1] IMPLICIT GeneralNames OPTIONAL, authorityCertSerialNumber [2] IMPLICIT CertificateSerialNumber OPTIONAL } KeyIdentifier ::= OCTET STRING CertificateSerialNumber ::= INTEGER id-ce OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 29}

Author:
mal
See Also:
Serialized Form

Field Summary
protected  ASN1Sequence authorityKeyIdentifier
           
static int CERT_ISSUER_TYPE
           
static int CERT_SERIAL_NUMBER_TYPE
           
protected  ASN1Integer certSerialNumber
           
static String ID_CE_AUTHORITY_KEY_IDENTIFIER
           
static int KEY_IDENTIFIER_TYPE
           
 
Fields inherited from class codec.x509.X509Extension
critical, extnID, extnValue
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AuthorityKeyIdentifierExtension()
          Constructor for SubjectKeyIdentifierExtension.
AuthorityKeyIdentifierExtension(byte[] ext)
          Constructor for SubjectKeyIdentifierExtension.
 
Method Summary
 void addCertIssuer(GeneralName generalName)
          adds an issuers of the certs as a GeneralName
 void decode(Decoder dec)
          Reads this collection from the given Decoder.
 void setCertSerialNumber(BigInteger serialNumber)
          sets the certificate serial number
 void setKeyIdentifier(byte[] identifier)
          sets the key identifier, which is normally a hash of the public key.
 String toString()
          Returns a human-readable String representation of this extension
 String toString(String offset)
          generates a human readable representation of the object. the representation is indeted using the String offset, if possible.
 
Methods inherited from class codec.x509.X509Extension
decodeExtensionValue, getCriticalExtensionOIDs, getEncoded, getExtensionValue, getNonCriticalExtensionOIDs, getOID, getValue, hasUnsupportedCriticalExtension, isCritical, setCritical, setOID, setValue
 
Methods inherited from class codec.asn1.ASN1Sequence
getTag
 
Methods inherited from class codec.asn1.ASN1AbstractCollection
checkConstraints, encode, getCollection, getConstraint, getTagClass, isExplicit, isOptional, isType, readExternal, setConstraint, setExplicit, setOptional, writeExternal
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Field Detail

ID_CE_AUTHORITY_KEY_IDENTIFIER

public static final String ID_CE_AUTHORITY_KEY_IDENTIFIER

authorityKeyIdentifier

protected ASN1Sequence authorityKeyIdentifier

KEY_IDENTIFIER_TYPE

public static final int KEY_IDENTIFIER_TYPE

CERT_ISSUER_TYPE

public static final int CERT_ISSUER_TYPE

CERT_SERIAL_NUMBER_TYPE

public static final int CERT_SERIAL_NUMBER_TYPE

certSerialNumber

protected ASN1Integer certSerialNumber
Constructor Detail

AuthorityKeyIdentifierExtension

public AuthorityKeyIdentifierExtension()
                                throws Exception
Constructor for SubjectKeyIdentifierExtension.
Throws:
Exception -  

AuthorityKeyIdentifierExtension

public AuthorityKeyIdentifierExtension(byte[] ext)
                                throws ASN1Exception,
                                       IOException
Constructor for SubjectKeyIdentifierExtension.
Parameters:
ext -  
Throws:
ASN1Exception -  
IOException -  
Method Detail

setKeyIdentifier

public void setKeyIdentifier(byte[] identifier)
                      throws Exception
sets the key identifier, which is normally a hash of the public key.
Parameters:
identifier - identifier as byte array.

addCertIssuer

public void addCertIssuer(GeneralName generalName)
                   throws Exception
adds an issuers of the certs as a GeneralName
Parameters:
generalName - the general name

setCertSerialNumber

public void setCertSerialNumber(BigInteger serialNumber)
                         throws Exception
sets the certificate serial number
Parameters:
serialNumber - the serial number of the certificate

decode

public void decode(Decoder dec)
            throws ASN1Exception,
                   IOException
Description copied from class: ASN1AbstractCollection
Reads this collection from the given Decoder. This type is initialized with the decoded data. The components of the decoded collection must match the components of this collection. If they do then the components are also initialized with the decoded values. Otherwise an exception is thrown.
Overrides:
decode in class ASN1AbstractCollection
Following copied from class: codec.asn1.ASN1AbstractCollection
Parameters:
dec - The decoder to read from.

toString

public String toString(String offset)
generates a human readable representation of the object. the representation is indeted using the String offset, if possible.
Overrides:
toString in class X509Extension
Parameters:
offset - String

toString

public String toString()
Description copied from class: X509Extension
Returns a human-readable String representation of this extension
Overrides:
toString in class X509Extension
Following copied from class: codec.asn1.ASN1AbstractCollection
Returns:
The string representation of this ASN.1 collection.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.