- java.lang.Object
-
- java.lang.Enum<RevocationReason>
-
- org.shredzone.acme4j.RevocationReason
-
- All Implemented Interfaces:
Serializable
,Comparable<RevocationReason>
public enum RevocationReason extends Enum<RevocationReason>
An enumeration of revocation reasons.- See Also:
- RFC 5280 Section 5.3.1
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AA_COMPROMISE
AFFILIATION_CHANGED
CA_COMPROMISE
CERTIFICATE_HOLD
CESSATION_OF_OPERATION
KEY_COMPROMISE
PRIVILEGE_WITHDRAWN
REMOVE_FROM_CRL
SUPERSEDED
UNSPECIFIED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RevocationReason
code(int reasonCode)
Returns theRevocationReason
that matches the reason code.int
getReasonCode()
Returns the reason code as defined in RFC 5280.static RevocationReason
valueOf(String name)
Returns the enum constant of this type with the specified name.static RevocationReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNSPECIFIED
public static final RevocationReason UNSPECIFIED
-
KEY_COMPROMISE
public static final RevocationReason KEY_COMPROMISE
-
CA_COMPROMISE
public static final RevocationReason CA_COMPROMISE
-
AFFILIATION_CHANGED
public static final RevocationReason AFFILIATION_CHANGED
-
SUPERSEDED
public static final RevocationReason SUPERSEDED
-
CESSATION_OF_OPERATION
public static final RevocationReason CESSATION_OF_OPERATION
-
CERTIFICATE_HOLD
public static final RevocationReason CERTIFICATE_HOLD
-
REMOVE_FROM_CRL
public static final RevocationReason REMOVE_FROM_CRL
-
PRIVILEGE_WITHDRAWN
public static final RevocationReason PRIVILEGE_WITHDRAWN
-
AA_COMPROMISE
public static final RevocationReason AA_COMPROMISE
-
-
Method Detail
-
values
public static RevocationReason[] 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 (RevocationReason c : RevocationReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RevocationReason 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
-
getReasonCode
public int getReasonCode()
Returns the reason code as defined in RFC 5280.
-
code
public static RevocationReason code(int reasonCode)
Returns theRevocationReason
that matches the reason code.- Parameters:
reasonCode
- Reason code as defined in RFC 5280- Returns:
- Matching
RevocationReason
- Throws:
IllegalArgumentException
- if the reason code is unknown or invalid
-
-