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

public Class CRLReasonCodeExtension

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

The reasonCode is a non-critical CRL entry extension that identifies the reason for the certificate revocation.
Author
Hemma Prafullchandra
See Also
java.security.cert.CRLReason, Extension

Field Summary

Modifier and TypeField and Description
public static final String
private int
private static final CRLReason[]
Inherited from sun.security.x509.Extension:
criticalextensionIdextensionValue

Constructor Summary

AccessConstructor and Description
public
CRLReasonCodeExtension(int
the enumerated value for the reason code.
reason
)

Create a CRLReasonCodeExtension with the passed in reason.

public
CRLReasonCodeExtension(boolean
true if the extension is to be treated as critical.
critical
,
int
the enumerated value for the reason code, must be positive.
reason
)

Create a CRLReasonCodeExtension with the passed in reason.

public
CRLReasonCodeExtension(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 DerOutputStream.

private void
public String
getName()

Overrides sun.security.x509.Extension.getName.

Return the name of this extension.

public int
public CRLReason
getReasonCode()

Return the reason as a CRLReason enum.

public String
toString()

Overrides sun.security.x509.Extension.toString.

Returns a printable representation of the Reason code.

Inherited from sun.security.x509.Extension:
encodeequalsgetExtensionIdgetExtensionValuegetIdgetValuehashCodeisCriticalnewExtension

Field Detail

NAMEback to summary
public static final String NAME
reasonCodeback to summary
private int reasonCode
valuesback to summary
private static final CRLReason[] values

Constructor Detail

CRLReasonCodeExtensionback to summary
public CRLReasonCodeExtension(int reason) throws IOException

Create a CRLReasonCodeExtension with the passed in reason. Criticality automatically set to false.

Parameters
reason:int

the enumerated value for the reason code.

CRLReasonCodeExtensionback to summary
public CRLReasonCodeExtension(boolean critical, int reason)

Create a CRLReasonCodeExtension with the passed in reason.

Parameters
critical:boolean

true if the extension is to be treated as critical.

reason:int

the enumerated value for the reason code, must be positive.

CRLReasonCodeExtensionback to summary
public CRLReasonCodeExtension(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 DerOutputStream.

Parameters
out:DerOutputStream

the DerOutputStream to write the extension to.

Annotations
@Override
encodeThisback to summary
private void encodeThis()
getNameback to summary
public String getName()

Overrides sun.security.x509.Extension.getName.

Return the name of this extension.

Annotations
@Override
getReasonback to summary
public int getReason()
getReasonCodeback to summary
public CRLReason getReasonCode()

Return the reason as a CRLReason enum.

toStringback to summary
public String toString()

Overrides sun.security.x509.Extension.toString.

Returns a printable representation of the Reason code.