Top Description Fields Constructors Methods
org.bouncycastle.asn1.x509

public Class AuthorityKeyIdentifier

extends ASN1Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.x509.extension.AuthorityKeyIdentifierStructure
Imports
java.math.BigInteger, java.util.Enumeration, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .DEROctetString, .DERSequence, .DERTaggedObject, org.bouncycastle.crypto.Digest, org.bouncycastle.crypto.digests.SHA1Digest, org.bouncycastle.util.Arrays, org.bouncycastle.util.encoders.Hex

The AuthorityKeyIdentifier object.
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

Field Summary

Modifier and TypeField and Description
pack-priv GeneralNames
pack-priv ASN1Integer
pack-priv ASN1OctetString

Constructor Summary

AccessConstructor and Description
protected
public
AuthorityKeyIdentifier(SubjectPublicKeyInfo spki)

Deprecated create the extension using org.bouncycastle.cert.X509ExtensionUtils
Calulates the keyidentifier using a SHA1 hash over the BIT STRING from SubjectPublicKeyInfo as defined in RFC2459.
public
AuthorityKeyIdentifier(SubjectPublicKeyInfo spki, GeneralNames name, BigInteger serialNumber)

Deprecated create the extension using org.bouncycastle.cert.X509ExtensionUtils
create an AuthorityKeyIdentifier with the GeneralNames tag and the serial number provided as well.
public
AuthorityKeyIdentifier(GeneralNames name, BigInteger serialNumber)

create an AuthorityKeyIdentifier with the GeneralNames tag and the serial number provided.

public
AuthorityKeyIdentifier(byte[] keyIdentifier)

create an AuthorityKeyIdentifier with a precomputed key identifier

public
AuthorityKeyIdentifier(byte[] keyIdentifier, GeneralNames name, BigInteger serialNumber)

create an AuthorityKeyIdentifier with a precomputed key identifier and the GeneralNames tag and the serial number provided as well.

Method Summary

Modifier and TypeMethod and Description
public static AuthorityKeyIdentifier
public GeneralNames
public BigInteger
public static AuthorityKeyIdentifier
getInstance(ASN1TaggedObject obj, boolean explicit)

public static AuthorityKeyIdentifier
public byte[]
public ASN1Primitive
toASN1Primitive()

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

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

certissuerback to summary
pack-priv GeneralNames certissuer
certsernoback to summary
pack-priv ASN1Integer certserno
keyidentifierback to summary
pack-priv ASN1OctetString keyidentifier

Constructor Detail

AuthorityKeyIdentifierback to summary
protected AuthorityKeyIdentifier(ASN1Sequence seq)
AuthorityKeyIdentifierback to summary
public AuthorityKeyIdentifier(SubjectPublicKeyInfo spki)

Deprecated

create the extension using org.bouncycastle.cert.X509ExtensionUtils

Calulates the keyidentifier using a SHA1 hash over the BIT STRING from SubjectPublicKeyInfo as defined in RFC2459. Example of making a AuthorityKeyIdentifier:

  SubjectPublicKeyInfo apki = new SubjectPublicKeyInfo((ASN1Sequence)new ASN1InputStream(
      publicKey.getEncoded()).readObject());
  AuthorityKeyIdentifier aki = new AuthorityKeyIdentifier(apki);
AuthorityKeyIdentifierback to summary
public AuthorityKeyIdentifier(SubjectPublicKeyInfo spki, GeneralNames name, BigInteger serialNumber)

Deprecated

create the extension using org.bouncycastle.cert.X509ExtensionUtils

create an AuthorityKeyIdentifier with the GeneralNames tag and the serial number provided as well.

AuthorityKeyIdentifierback to summary
public AuthorityKeyIdentifier(GeneralNames name, BigInteger serialNumber)

create an AuthorityKeyIdentifier with the GeneralNames tag and the serial number provided.

AuthorityKeyIdentifierback to summary
public AuthorityKeyIdentifier(byte[] keyIdentifier)

create an AuthorityKeyIdentifier with a precomputed key identifier

AuthorityKeyIdentifierback to summary
public AuthorityKeyIdentifier(byte[] keyIdentifier, GeneralNames name, BigInteger serialNumber)

create an AuthorityKeyIdentifier with a precomputed key identifier and the GeneralNames tag and the serial number provided as well.

Method Detail

fromExtensionsback to summary
public static AuthorityKeyIdentifier fromExtensions(Extensions extensions)
getAuthorityCertIssuerback to summary
public GeneralNames getAuthorityCertIssuer()
getAuthorityCertSerialNumberback to summary
public BigInteger getAuthorityCertSerialNumber()
getInstanceback to summary
public static AuthorityKeyIdentifier getInstance(ASN1TaggedObject obj, boolean explicit)
getInstanceback to summary
public static AuthorityKeyIdentifier getInstance(Object obj)
getKeyIdentifierback to summary
public byte[] getKeyIdentifier()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

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

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.

Returns:ASN1Primitive

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

a primitive representation of this object.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.