APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.x509

public Class AuthorityKeyIdentifierExtension

extends Extension
Class Inheritance
Imports
java.io.IOException, sun.security.util.*

This class represents the Authority Key Identifier Extension.

The authority key identifier extension provides a means of identifying the particular public key used to sign a certificate. This extension would be used where an issuer has multiple signing keys (either due to multiple concurrent key pairs or due to changeover).

The ASN.1 syntax for this is:

AuthorityKeyIdentifier ::= SEQUENCE {
   keyIdentifier             [0] KeyIdentifier           OPTIONAL,
   authorityCertIssuer       [1] GeneralNames            OPTIONAL,
   authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL
}
KeyIdentifier ::= OCTET STRING
Authors
Amit Kapoor, Hemma Prafullchandra
See Also
Extension

Field Summary

Modifier and TypeField and Description
private KeyIdentifier
public static final String
private GeneralNames
private SerialNumber
private static final byte
private static final byte
private static final byte
Inherited from sun.security.x509.Extension:
criticalextensionIdextensionValue

Constructor Summary

AccessConstructor and Description
public
AuthorityKeyIdentifierExtension(KeyIdentifier
the KeyIdentifier associated with this extension.
kid
,
GeneralNames
the GeneralNames associated with this extension
names
,
SerialNumber
the CertificateSerialNumber associated with this extension.
sn
)

The default constructor for this extension.

public
AuthorityKeyIdentifierExtension(Boolean
true if the extension is to be treated as critical.
critical
,
Object
an array of DER encoded bytes of the actual value.
value
)

Create the extension from the passed DER encoded value of the same.

Method Summary

Modifier and TypeMethod and Description
public void
encode(DerOutputStream
the DerOutputStream to write the extension to.
out
)

Overrides sun.security.x509.Extension.encode.

Implements sun.security.util.DerEncoder.encode.

Write the extension to the OutputStream.

private void
public GeneralNames
public byte[]
getEncodedKeyIdentifier()

Return the encoded key identifier, or null if not specified.

public KeyIdentifier
public String
getName()

Overrides sun.security.x509.Extension.getName.

Return the name of this extension.

public SerialNumber
public String
toString()

Overrides sun.security.x509.Extension.toString.

Return the object as a string.

Inherited from sun.security.x509.Extension:
encodeequalsgetExtensionIdgetExtensionValuegetIdgetValuehashCodeisCriticalnewExtension

Field Detail

idback to summary
private KeyIdentifier id
NAMEback to summary
public static final String NAME
namesback to summary
private GeneralNames names
serialNumback to summary
private SerialNumber serialNum
TAG_IDback to summary
private static final byte TAG_ID
TAG_NAMESback to summary
private static final byte TAG_NAMES
TAG_SERIAL_NUMback to summary
private static final byte TAG_SERIAL_NUM

Constructor Detail

AuthorityKeyIdentifierExtensionback to summary
public AuthorityKeyIdentifierExtension(KeyIdentifier kid, GeneralNames names, SerialNumber sn)

The default constructor for this extension. At least one parameter must be non null. Null parameters make the element optional (not present).

Parameters
kid:KeyIdentifier

the KeyIdentifier associated with this extension.

names:GeneralNames

the GeneralNames associated with this extension

sn:SerialNumber

the CertificateSerialNumber associated with this extension.

AuthorityKeyIdentifierExtensionback to summary
public AuthorityKeyIdentifierExtension(Boolean critical, Object value) throws IOException

Create the extension from the passed DER encoded value of the same.

Parameters
critical:Boolean

true if the extension is to be treated as critical.

value:Object

an array of DER encoded bytes of the actual value.

Exceptions
IOException:
on error.
ClassCastException:
if value is not an array of bytes

Method Detail

encodeback to summary
public void encode(DerOutputStream out)

Overrides sun.security.x509.Extension.encode.

Implements sun.security.util.DerEncoder.encode.

Write the extension to the OutputStream.

Parameters
out:DerOutputStream

the DerOutputStream to write the extension to.

Annotations
@Override
encodeThisback to summary
private void encodeThis()
getAuthNameback to summary
public GeneralNames getAuthName()
getEncodedKeyIdentifierback to summary
public byte[] getEncodedKeyIdentifier() throws IOException

Return the encoded key identifier, or null if not specified.

getKeyIdentifierback to summary
public KeyIdentifier getKeyIdentifier()
getNameback to summary
public String getName()

Overrides sun.security.x509.Extension.getName.

Return the name of this extension.

Annotations
@Override
getSerialNumberback to summary
public SerialNumber getSerialNumber()
toStringback to summary
public String toString()

Overrides sun.security.x509.Extension.toString.

Return the object as a string.