public class CRLReasonCodeExtension extends Extension implements CertAttrSet<java.lang.String>
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| Modifier and Type | Field and Description |
|---|---|
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 java.lang.String |
NAME
Attribute name and Reason codes
|
static int |
PRIVILEGE_WITHDRAWN |
static java.lang.String |
REASON |
static int |
REMOVE_FROM_CRL |
static int |
SUPERSEDED |
static int |
UNSPECIFIED |
critical, extensionId, extensionValue| Constructor and Description |
|---|
CRLReasonCodeExtension(boolean critical,
int reason)
Create a CRLReasonCodeExtension with the passed in reason.
|
CRLReasonCodeExtension(java.lang.Boolean critical,
java.lang.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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(java.lang.String name)
Delete the attribute value.
|
void |
encode(java.io.OutputStream out)
Write the extension to the DerOutputStream.
|
java.lang.Object |
get(java.lang.String name)
Get the attribute value.
|
java.util.Enumeration<java.lang.String> |
getElements()
Return an enumeration of names of attributes existing within this
attribute.
|
java.lang.String |
getName()
Return the name of this attribute.
|
void |
set(java.lang.String name,
java.lang.Object obj)
Set the attribute value.
|
java.lang.String |
toString()
Returns a printable representation of the Reason code.
|
encode, equals, getExtensionId, getExtensionValue, hashCode, isCriticalpublic static final java.lang.String NAME
public static final java.lang.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
public CRLReasonCodeExtension(int reason)
throws java.io.IOException
reason - the enumerated value for the reason code.java.io.IOExceptionpublic CRLReasonCodeExtension(boolean critical,
int reason)
throws java.io.IOException
critical - true if the extension is to be treated as critical.reason - the enumerated value for the reason code.java.io.IOExceptionpublic CRLReasonCodeExtension(java.lang.Boolean critical,
java.lang.Object value)
throws java.io.IOException
critical - true if the extension is to be treated as critical.value - an array of DER encoded bytes of the actual value.java.lang.ClassCastException - if value is not an array of bytesjava.io.IOException - on error.public void set(java.lang.String name,
java.lang.Object obj)
throws java.io.IOException
set in interface CertAttrSet<java.lang.String>name - the name of the attribute (e.g. "x509.info.key")obj - the attribute object.java.io.IOException - on other errors.public java.lang.Object get(java.lang.String name)
throws java.io.IOException
get in interface CertAttrSet<java.lang.String>name - the name of the attribute to return.java.io.IOException - on other errors.public void delete(java.lang.String name)
throws java.io.IOException
delete in interface CertAttrSet<java.lang.String>name - the name of the attribute to delete.java.io.IOException - on other errors.public java.lang.String toString()
toString in interface CertAttrSet<java.lang.String>toString in class Extensionpublic void encode(java.io.OutputStream out)
throws java.io.IOException
encode in interface CertAttrSet<java.lang.String>out - the DerOutputStream to write the extension to.java.io.IOException - on encoding errors.public java.util.Enumeration<java.lang.String> getElements()
getElements in interface CertAttrSet<java.lang.String>public java.lang.String getName()
getName in interface CertAttrSet<java.lang.String>Copyright © 2020. All Rights Reserved.