Package org.bouncycastle.asn1.x509
Class AuthorityKeyIdentifier
- java.lang.Object
-
- org.bouncycastle.asn1.ASN1Object
-
- org.bouncycastle.asn1.x509.AuthorityKeyIdentifier
-
- All Implemented Interfaces:
ASN1Encodable,Encodable
- Direct Known Subclasses:
AuthorityKeyIdentifierStructure
public class AuthorityKeyIdentifier extends ASN1Object
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
-
-
Constructor Summary
Constructors Modifier Constructor Description AuthorityKeyIdentifier(byte[] keyIdentifier)create an AuthorityKeyIdentifier with a precomputed key identifierAuthorityKeyIdentifier(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.protectedAuthorityKeyIdentifier(ASN1Sequence seq)AuthorityKeyIdentifier(GeneralNames name, BigInteger serialNumber)create an AuthorityKeyIdentifier with the GeneralNames tag and the serial number provided.AuthorityKeyIdentifier(SubjectPublicKeyInfo spki)Deprecated.create the extension using org.bouncycastle.cert.X509ExtensionUtilsAuthorityKeyIdentifier(SubjectPublicKeyInfo spki, GeneralNames name, BigInteger serialNumber)Deprecated.create the extension using org.bouncycastle.cert.X509ExtensionUtils
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthorityKeyIdentifierfromExtensions(Extensions extensions)GeneralNamesgetAuthorityCertIssuer()BigIntegergetAuthorityCertSerialNumber()static AuthorityKeyIdentifiergetInstance(Object obj)static AuthorityKeyIdentifiergetInstance(ASN1TaggedObject obj, boolean explicit)byte[]getKeyIdentifier()ASN1PrimitivetoASN1Primitive()Produce an object suitable for an ASN1OutputStream.StringtoString()Returns a string containing a concise, human-readable description of this object.-
Methods inherited from class org.bouncycastle.asn1.ASN1Object
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
-
-
-
-
Constructor Detail
-
AuthorityKeyIdentifier
protected AuthorityKeyIdentifier(ASN1Sequence seq)
-
AuthorityKeyIdentifier
public AuthorityKeyIdentifier(SubjectPublicKeyInfo spki)
Deprecated.create the extension using org.bouncycastle.cert.X509ExtensionUtilsCalulates 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);
-
AuthorityKeyIdentifier
public AuthorityKeyIdentifier(SubjectPublicKeyInfo spki, GeneralNames name, BigInteger serialNumber)
Deprecated.create the extension using org.bouncycastle.cert.X509ExtensionUtilscreate an AuthorityKeyIdentifier with the GeneralNames tag and the serial number provided as well.
-
AuthorityKeyIdentifier
public AuthorityKeyIdentifier(GeneralNames name, BigInteger serialNumber)
create an AuthorityKeyIdentifier with the GeneralNames tag and the serial number provided.
-
AuthorityKeyIdentifier
public AuthorityKeyIdentifier(byte[] keyIdentifier)
create an AuthorityKeyIdentifier with a precomputed key identifier
-
AuthorityKeyIdentifier
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
-
getInstance
public static AuthorityKeyIdentifier getInstance(ASN1TaggedObject obj, boolean explicit)
-
getInstance
public static AuthorityKeyIdentifier getInstance(Object obj)
-
fromExtensions
public static AuthorityKeyIdentifier fromExtensions(Extensions extensions)
-
getKeyIdentifier
public byte[] getKeyIdentifier()
-
getAuthorityCertIssuer
public GeneralNames getAuthorityCertIssuer()
-
getAuthorityCertSerialNumber
public BigInteger getAuthorityCertSerialNumber()
-
toASN1Primitive
public ASN1Primitive toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-
toString
public String toString()
Description copied from class:ObjectReturns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toStringmethod if you intend implementing your owntoStringmethod.
-
-