Package google.registry.flows.certs
Enum CertificateChecker.CertificateViolation
- java.lang.Object
-
- java.lang.Enum<CertificateChecker.CertificateViolation>
-
- google.registry.flows.certs.CertificateChecker.CertificateViolation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CertificateChecker.CertificateViolation>
- Enclosing class:
- CertificateChecker
public static enum CertificateChecker.CertificateViolation extends java.lang.Enum<CertificateChecker.CertificateViolation>
The type of violation a certificate has based on the certificate requirements (go/registry-proxy-security).
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALGORITHM_CONSTRAINED
EXPIRED
INVALID_ECDSA_CURVE
NOT_YET_VALID
RSA_KEY_LENGTH_TOO_SHORT
VALIDITY_LENGTH_TOO_LONG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDisplayMessage(CertificateChecker certificateChecker)
Gets a suitable end-user-facing display message for this particular certificate violation.static CertificateChecker.CertificateViolation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CertificateChecker.CertificateViolation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXPIRED
public static final CertificateChecker.CertificateViolation EXPIRED
-
NOT_YET_VALID
public static final CertificateChecker.CertificateViolation NOT_YET_VALID
-
VALIDITY_LENGTH_TOO_LONG
public static final CertificateChecker.CertificateViolation VALIDITY_LENGTH_TOO_LONG
-
RSA_KEY_LENGTH_TOO_SHORT
public static final CertificateChecker.CertificateViolation RSA_KEY_LENGTH_TOO_SHORT
-
ALGORITHM_CONSTRAINED
public static final CertificateChecker.CertificateViolation ALGORITHM_CONSTRAINED
-
INVALID_ECDSA_CURVE
public static final CertificateChecker.CertificateViolation INVALID_ECDSA_CURVE
-
-
Method Detail
-
values
public static CertificateChecker.CertificateViolation[] 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 (CertificateChecker.CertificateViolation c : CertificateChecker.CertificateViolation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CertificateChecker.CertificateViolation valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getDisplayMessage
public java.lang.String getDisplayMessage(CertificateChecker certificateChecker)
Gets a suitable end-user-facing display message for this particular certificate violation.Note that the
CertificateChecker
instance must be passed in because it contains configuration values (e.g. minimum RSA key length) that go into the error message text.
-
-