Enum Class CmpProtectionPolicy

java.lang.Object
java.lang.Enum<CmpProtectionPolicy>
zeroecho.pki.server.cmp.CmpProtectionPolicy
All Implemented Interfaces:
Serializable, Comparable<CmpProtectionPolicy>, Constable

public enum CmpProtectionPolicy extends Enum<CmpProtectionPolicy>
CMP PKIMessage protection policy required by a CMP endpoint.

Each CMP endpoint is bound to exactly one protection policy. Incoming messages that do not match the bound policy are rejected with badMessageCheck.

Since:
1.0
  • Enum Constant Details

    • SIGNATURE_BASED

      public static final CmpProtectionPolicy SIGNATURE_BASED
      Signature-based protection using the sender's certificate private key. Suitable for certificate update (kur) and revocation (rr) when the sender already holds a valid certificate.
    • SHARED_SECRET_MAC

      public static final CmpProtectionPolicy SHARED_SECRET_MAC
      Shared-secret MAC protection (passwordBasedMac). Used for initial enrollment (ir) where the sender has no certificate yet.
  • Method Details

    • values

      public static CmpProtectionPolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CmpProtectionPolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null