|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.extensions.X509V3Extension | +--com.rsa.certj.cert.extensions.ReasonCode
This class holds, encodes, and decodes the
ReasonCode
extension. This CRL entry
extension field identifies a reason for the
certificate revocation. The reason code may be used by
applications to decide, based on local policy, how to
react to posted revocations.
reasonCode EXTENSION ::= { SYNTAX CRLReason IDENTIFIED BY id-ce-reasonCode } CRLReason ::= ENUMERATED { unspecified (0), keyCompromise (1), cACompromise (2), affiliationChanged (3), superseded (4), cessationOfOperation (5), certificateHold (6), removeFromCRL (8) } |
See Also
Field Summary |
|
static int |
REASON_CODE_AFFILIATION_CHANGED
The flag to indicate that reason code is affiliationChanged. |
static int |
REASON_CODE_CA_COMPROMISE
The flag to indicate that reason code is caCompromise. |
static int |
REASON_CODE_CERTIFICATE_HOLD
The flag to indicate that reason code is certificateHold. |
static int |
REASON_CODE_CESSATION_OF_OPERATION
The flag to indicate that reason code is cessationOfOperation. |
static int |
REASON_CODE_KEY_COMPROMISE
The flag to indicate that reason code is keyCompromise. |
static int |
REASON_CODE_REMOVED_FROM_CRL
The flag to indicate that reason code is removedFromCrl. |
static int |
REASON_CODE_SUPERSEDED
The flag to indicate that reason code is superseded. |
static int |
REASON_CODE_UNSPECIFIED
The flag to indicate that reason code is unspecified. |
Constructor Summary |
|
ReasonCode()
Constructs an empty |
|
ReasonCode(int reasonCode,
boolean criticality)
Constructs a |
Method Summary |
|
clone()
Overrides the default |
|
void |
decodeValue(byte[] valueBER,
int offset)
Decode the value. |
int |
derEncodeValue(byte[] encoding,
int offset)
Place the encoding of the value into encoding, beginning at offset. |
int |
derEncodeValueInit()
Initialize for encoding the value. |
int |
getReasonCode()
Gets the value of this object, the reason code. |
void |
setReasonCode(int code)
Sets the value of this object, the reason code. |
boolean |
verifyReasonCode(int codeToVerify)
Verifies that the flags in this extension are set to a specified reason code. |
Methods inherited from class com.rsa.certj.cert.extensions.X509V3Extension |
extend, getCriticality, getDEREncoding, getDERLen, getExtensionType, getExtensionTypeString, getInstance, getNextBEROffset, isExtensionType, setCriticality, setEncoding, setSpecialOID, setStandardOID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int REASON_CODE_UNSPECIFIED
public static final int REASON_CODE_KEY_COMPROMISE
public static final int REASON_CODE_CA_COMPROMISE
public static final int REASON_CODE_AFFILIATION_CHANGED
public static final int REASON_CODE_SUPERSEDED
public static final int REASON_CODE_CESSATION_OF_OPERATION
public static final int REASON_CODE_CERTIFICATE_HOLD
public static final int REASON_CODE_REMOVED_FROM_CRL
Constructor Detail |
public ReasonCode()
ReasonCode
object.public ReasonCode(int reasonCode, boolean criticality) throws CertificateException
ReasonCode
object and
initializes it with the given values.
The value of ReasonCode must be one of the flags
defined in this class.Parameters
reasonCode | An unspecified 0 keyCompromise 1 cACompromise 2 affiliationChanged 3 superseded 4 cessationOfOperation 5 certificateHold 6 removeFromCRL 8 | ||
criticality | The user-specified criticality. |
Throws
CertificateException
- If the value is not a valid reason code.Method Detail |
public void decodeValue(byte[] valueBER, int offset) throws CertificateException
Overrides
decodeValue
in class X509V3Extension
Parameters
valueBER | The BER encoding of the extension's value. | ||
offset | The offset into valueBER where the encoding begins. |
Throws
CertificateException
- If the encoding is invalid for this
extension.public void setReasonCode(int code)
Parameters
code | The reason code value. The values are as follows: unspecified 0 keyCompromise 1 cACompromise 2 affiliationChanged 3 superseded 4 cessationOfOperation 5 certificateHold 6 removeFromCRL 8 |
public int getReasonCode()
Returns
public boolean verifyReasonCode(int codeToVerify)
Parameters
codeToVerify | An unspecified 0 keyCompromise 1 cACompromise 2 affiliationChanged 3 superseded 4 cessationOfOperation 5 certificateHold 6 removeFromCRL 8 |
Returns
boolean
that indicates whether the flags
in this extension are set to the reason code contained in
codeToVerify.public int derEncodeValueInit()
Overrides
derEncodeValueInit
in class X509V3Extension
Returns
public int derEncodeValue(byte[] encoding, int offset)
Overrides
derEncodeValue
in class X509V3Extension
Parameters
encoding | The byte array into which the result will be placed. | ||
offset | The offest into encoding where the writing is to begin. |
Returns
public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Overrides
clone
in class X509V3Extension
Returns
ReasonCode
object,
a copy of this object.
Throws
CloneNotSupportedException
- If the cloning operation
is not successful.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |