Package org.xipki.security
Enum CrlReason
- java.lang.Object
-
- java.lang.Enum<CrlReason>
-
- org.xipki.security.CrlReason
-
- All Implemented Interfaces:
Serializable,Comparable<CrlReason>
public enum CrlReason extends Enum<CrlReason>
The CRLReason enumeration specifies the reason that a certificate is revoked, as defined in RFC 3280: Internet X.509 Public Key Infrastructure Certificate and CRL Profile.- Since:
- 2.0.0
- Author:
- Lijun Liao (xipki)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AA_COMPROMISEThis reason indicates that it is known or suspected that the certificate subject's private key has been compromised.AFFILIATION_CHANGEDThis reason indicates that the subject's name or other information has changed.CA_COMPROMISEThis reason indicates that it is known or suspected that the certificate subject's private key has been compromised.CERTIFICATE_HOLDThis reason indicates that the certificate has been put on hold.CESSATION_OF_OPERATIONThis reason indicates that the certificate is no longer needed.KEY_COMPROMISEThis reason indicates that it is known or suspected that the certificate subject's private key has been compromised.PRIVILEGE_WITHDRAWNThis reason indicates that the privileges granted to the subject of the certificate have been withdrawn.REMOVE_FROM_CRLThis reason indicates that the certificate was previously on hold and should be removed from the CRL.SUPERSEDEDThis reason indicates that the certificate has been superseded.UNSPECIFIEDThis reason indicates that it is unspecified as to why the certificate has been revoked.
-
Field Summary
Fields Modifier and Type Field Description static List<CrlReason>PERMITTED_CLIENT_CRLREASONS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CrlReasonforNameOrText(String text)static CrlReasonforReasonCode(int reasonCode)static CrlReasonfromReason(CRLReason reason)intgetCode()StringgetDescription()static CrlReasonvalueOf(String name)Returns the enum constant of this type with the specified name.static CrlReason[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNSPECIFIED
public static final CrlReason UNSPECIFIED
This reason indicates that it is unspecified as to why the certificate has been revoked.
-
KEY_COMPROMISE
public static final CrlReason KEY_COMPROMISE
This reason indicates that it is known or suspected that the certificate subject's private key has been compromised. It applies to end-entity certificates only.
-
CA_COMPROMISE
public static final CrlReason CA_COMPROMISE
This reason indicates that it is known or suspected that the certificate subject's private key has been compromised. It applies to certificate authority (CA) certificates only.
-
AFFILIATION_CHANGED
public static final CrlReason AFFILIATION_CHANGED
This reason indicates that the subject's name or other information has changed.
-
SUPERSEDED
public static final CrlReason SUPERSEDED
This reason indicates that the certificate has been superseded.
-
CESSATION_OF_OPERATION
public static final CrlReason CESSATION_OF_OPERATION
This reason indicates that the certificate is no longer needed.
-
CERTIFICATE_HOLD
public static final CrlReason CERTIFICATE_HOLD
This reason indicates that the certificate has been put on hold.
-
REMOVE_FROM_CRL
public static final CrlReason REMOVE_FROM_CRL
This reason indicates that the certificate was previously on hold and should be removed from the CRL. It is for use with delta CRLs.
-
PRIVILEGE_WITHDRAWN
public static final CrlReason PRIVILEGE_WITHDRAWN
This reason indicates that the privileges granted to the subject of the certificate have been withdrawn.
-
AA_COMPROMISE
public static final CrlReason AA_COMPROMISE
This reason indicates that it is known or suspected that the certificate subject's private key has been compromised. It applies to authority attribute (AA) certificates only.
-
-
Method Detail
-
values
public static CrlReason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CrlReason c : CrlReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CrlReason valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode()
-
getDescription
public String getDescription()
-
forReasonCode
public static CrlReason forReasonCode(int reasonCode)
-
-