|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsun.security.x509.Extension
sun.security.x509.CRLReasonCodeExtension
public class CRLReasonCodeExtension
The reasonCode is a non-critical CRL entry extension that identifies the reason for the certificate revocation. CAs are strongly encouraged to include reason codes in CRL entries; however, the reason code CRL entry extension should be absent instead of using the unspecified (0) reasonCode value.
The ASN.1 syntax for this is:
id-ce-cRLReason OBJECT IDENTIFIER ::= { id-ce 21 }
-- reasonCode ::= { CRLReason }
CRLReason ::= ENUMERATED {
unspecified (0),
keyCompromise (1),
cACompromise (2),
affiliationChanged (3),
superseded (4),
cessationOfOperation (5),
certificateHold (6),
removeFromCRL (8),
privilegeWithdrawn (9),
aACompromise (10) }
Extension,
CertAttrSet| Field Summary | |
|---|---|
static int |
AA_COMPROMISE
|
static int |
AFFLIATION_CHANGED
|
static int |
CA_COMPROMISE
|
static int |
CERTIFICATE_HOLD
|
static int |
CESSATION_OF_OPERATION
|
static int |
KEY_COMPROMISE
|
static String |
NAME
Attribute name and Reason codes |
static int |
PRIVILEGE_WITHDRAWN
|
static String |
REASON
|
static int |
REMOVE_FROM_CRL
|
static int |
SUPERSEDED
|
static int |
UNSPECIFIED
|
| Fields inherited from class sun.security.x509.Extension |
|---|
critical, extensionId, extensionValue |
| Constructor Summary | |
|---|---|
CRLReasonCodeExtension(boolean critical,
int reason)
Create a CRLReasonCodeExtension with the passed in reason. |
|
CRLReasonCodeExtension(Boolean critical,
Object value)
Create the extension from the passed DER encoded value of the same. |
|
CRLReasonCodeExtension(int reason)
Create a CRLReasonCodeExtension with the passed in reason. |
|
| Method Summary | |
|---|---|
void |
decode(InputStream in)
Decode the extension from the InputStream - not just the value but the OID, criticality and the extension value. |
void |
delete(String name)
Delete the attribute value. |
void |
encode(OutputStream out)
Write the extension to the DerOutputStream. |
Object |
get(String name)
Get the attribute value. |
Enumeration |
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()
Returns a printable representation of the Reason code. |
| Methods inherited from class sun.security.x509.Extension |
|---|
encode, equals, getExtensionId, getExtensionValue, hashCode, isCritical |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME
public static final String REASON
public static final int UNSPECIFIED
public static final int KEY_COMPROMISE
public static final int CA_COMPROMISE
public static final int AFFLIATION_CHANGED
public static final int SUPERSEDED
public static final int CESSATION_OF_OPERATION
public static final int CERTIFICATE_HOLD
public static final int REMOVE_FROM_CRL
public static final int PRIVILEGE_WITHDRAWN
public static final int AA_COMPROMISE
| Constructor Detail |
|---|
public CRLReasonCodeExtension(int reason)
throws IOException
reason - the enumerated value for the reason code.
IOException
public CRLReasonCodeExtension(boolean critical,
int reason)
throws IOException
critical - true if the extension is to be treated as critical.reason - the enumerated value for the reason code.
IOException
public CRLReasonCodeExtension(Boolean critical,
Object value)
throws IOException
critical - true if the extension is to be treated as critical.value - Array of DER encoded bytes of the actual value.
IOException - on error.| Method Detail |
|---|
public void set(String name,
Object obj)
throws IOException
set in interface CertAttrSetname - the name of the attribute (e.g. "x509.info.key")obj - the attribute object.
IOException - on other errors.
public Object get(String name)
throws IOException
get in interface CertAttrSetname - the name of the attribute to return.
IOException - on other errors.
public void delete(String name)
throws IOException
delete in interface CertAttrSetname - the name of the attribute to delete.
IOException - on other errors.public String toString()
toString in interface CertAttrSettoString in class Extension
public void decode(InputStream in)
throws IOException
decode in interface CertAttrSetin - the InputStream to unmarshal the contents from.
IOException - on parsing errors.
public void encode(OutputStream out)
throws IOException
encode in interface CertAttrSetout - the DerOutputStream to write the extension to.
IOException - on encoding errors.public Enumeration getElements()
getElements in interface CertAttrSetpublic String getName()
getName in interface CertAttrSet
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||