Package com.codedx.security
Enum CertificateAcceptance
- java.lang.Object
-
- java.lang.Enum<CertificateAcceptance>
-
- com.codedx.security.CertificateAcceptance
-
- All Implemented Interfaces:
Serializable
,Comparable<CertificateAcceptance>
public enum CertificateAcceptance extends Enum<CertificateAcceptance>
Enumeration to describe the possible outcomes of anInvalidCertificateStrategy
when presented with an invalid certificate.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCEPT_PERMANENTLY
The invalid certificate should be accepted on a long-term basis, e.g.ACCEPT_TEMPORARILY
The invalid certificate should be accepted on a short-term basis, e.g.REJECT
The invalid certificate should be rejected.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CertificateAcceptance
valueOf(String name)
Returns the enum constant of this type with the specified name.static CertificateAcceptance[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
REJECT
public static final CertificateAcceptance REJECT
The invalid certificate should be rejected.
-
ACCEPT_TEMPORARILY
public static final CertificateAcceptance ACCEPT_TEMPORARILY
The invalid certificate should be accepted on a short-term basis, e.g. for the duration of the session, or until the current JVM stops. The actual interpretation is up to the correspondingExtraCertManager
.
-
ACCEPT_PERMANENTLY
public static final CertificateAcceptance ACCEPT_PERMANENTLY
The invalid certificate should be accepted on a long-term basis, e.g. by adding the certificate to a custom KeyStore and persisting it to disk. The actual interpretation is up to the correspondingExtraCertManager
.
-
-
Method Detail
-
values
public static CertificateAcceptance[] 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 (CertificateAcceptance c : CertificateAcceptance.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CertificateAcceptance 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
-
-