public class

AuthorityKeyIdentifierExtension

extends Extension
implements CertAttrSet<T>
java.lang.Object
   ↳ sun.security.x509.Extension
     ↳ sun.security.x509.AuthorityKeyIdentifierExtension

Class Overview

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
 

Summary

Constants
String AUTH_NAME
String IDENT Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.
String KEY_ID
String NAME Attribute names.
String SERIAL_NUMBER
[Expand]
Inherited Fields
From class sun.security.x509.Extension
Public Constructors
AuthorityKeyIdentifierExtension(KeyIdentifier kid, GeneralNames name, SerialNumber sn)
The default constructor for this extension.
AuthorityKeyIdentifierExtension(Boolean critical, Object value)
Create the extension from the passed DER encoded value of the same.
Public Methods
void delete(String name)
Delete the attribute value.
void encode(OutputStream out)
Write the extension to the OutputStream.
Object get(String name)
Get the attribute value.
Enumeration<String> getElements()
Return an enumeration of names of attributes existing within this attribute.
String getName()
Return the name of this attribute.
void set(String name, Object obj)
Set the attribute value.
String toString()
Return the object as a string.
[Expand]
Inherited Methods
From class sun.security.x509.Extension
From class java.lang.Object
From interface sun.security.x509.CertAttrSet

Constants

public static final String AUTH_NAME

Constant Value: "auth_name"

public static final String IDENT

Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.

Constant Value: "x509.info.extensions.AuthorityKeyIdentifier"

public static final String KEY_ID

Constant Value: "key_id"

public static final String NAME

Attribute names.

Constant Value: "AuthorityKeyIdentifier"

public static final String SERIAL_NUMBER

Constant Value: "serial_number"

Public Constructors

public AuthorityKeyIdentifierExtension (KeyIdentifier kid, GeneralNames name, SerialNumber sn)

The default constructor for this extension. Null parameters make the element optional (not present).

Throws
IOException on error.

public AuthorityKeyIdentifierExtension (Boolean critical, Object value)

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

Parameters
critical true if the extension is to be treated as critical.
value an array of DER encoded bytes of the actual value.
Throws
ClassCastException if value is not an array of bytes
IOException on error.

Public Methods

public void delete (String name)

Delete the attribute value.

Parameters
name the name of the attribute to delete.
Throws
IOException

public void encode (OutputStream out)

Write the extension to the OutputStream.

Parameters
out the OutputStream to write the extension to.
Throws
IOException on error.

public Object get (String name)

Get the attribute value.

Parameters
name the name of the attribute to return.
Throws
IOException

public Enumeration<String> getElements ()

Return an enumeration of names of attributes existing within this attribute.

Returns
  • an enumeration of the attribute names.

public String getName ()

Return the name of this attribute.

Returns
  • the name of this CertAttrSet.

public void set (String name, Object obj)

Set the attribute value.

Parameters
name the name of the attribute (e.g. "x509.info.key")
obj the attribute object.
Throws
IOException

public String toString ()

Return the object as a string.

Returns
  • a string representation of the object.