Top Description Fields Constructors Methods
sun.security.x509

public Class SubjectKeyIdentifierExtension

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

Represent the Subject Key Identifier Extension. This extension, if present, provides a means of identifying the particular public key used in an application. This extension by default is marked non-critical.

Extensions are additional attributes which can be inserted in a X509 v3 certificate. For example a "Driving License Certificate" could have the driving license number as an extension.

Extensions are represented as a sequence of the extension identifier (Object Identifier), a boolean flag stating whether the extension is to be treated as being critical and the extension value itself (this is again a DER encoding of the extension value).

Authors
Amit Kapoor, Hemma Prafullchandra
See Also
Extension

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
SubjectKeyIdentifierExtension(byte[]
the octet string identifying the key identifier.
octetString
)

Create a SubjectKeyIdentifierExtension with the passed octet string.

public
SubjectKeyIdentifierExtension(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.

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 KeyIdentifier
public String
getName()

Overrides sun.security.x509.Extension.getName.

Return the name of this extension.
public String
toString()

Overrides sun.security.x509.Extension.toString.

Returns a printable representation.
Inherited from sun.security.x509.Extension:
encodeequalsgetExtensionIdgetExtensionValuegetIdgetValuehashCodeisCriticalnewExtension

Field Detail

idback to summary
private KeyIdentifier id
NAMEback to summary
public static final String NAME

Constructor Detail

SubjectKeyIdentifierExtensionback to summary
public SubjectKeyIdentifierExtension(byte[] octetString)

Create a SubjectKeyIdentifierExtension with the passed octet string. The criticality is set to False.

Parameters
octetString:byte[]

the octet string identifying the key identifier.

SubjectKeyIdentifierExtensionback to summary
public SubjectKeyIdentifierExtension(Boolean critical, Object value) throws IOException

Create the extension from the passed DER encoded value.

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()
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
toStringback to summary
public String toString()

Overrides sun.security.x509.Extension.toString.

Returns a printable representation.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object