
import os

class Error():

  MISSING_PARAM = {
                  code: 1,
                  name: "MissingParameter",
                  message: "Parameter(s) required is missing or empty."
                }
  CSR_FORMAT = {
                  code: 2,
                  name: "FileFormat",
                  message: "Not a valid PEM certificate signing request"
                }
  CSR_INVALID_CN = {
                  code: 3,
                  name: "CertificateSigningRequestContent",
                  message: "Request does not contain a Common Name"
                }
  CERT_FORMAT = {
                  code: 4,
                  name: "FileFormat",
                  message: "Not a valid PEM certificate"
                }
  SIGNATURE_VERIFICATION = {
                  code: 5,
                  name: "SignatureMismatch",
                  message: "Signature verification failed. Request was not signed with the correct key"
                }
  BAD_SIGNATURE_DIGEST = {
                  code: 6,
                  name: "SignatureMismatch",
                  message: "Hash algorithm not supported"
                }
  CSR_CONTENT_MISMATCH = {
                  code: 7,
                  name: "CertificateSigningRequestContent",
                  message: "Request content does not match replaced certificate"
                }
  JSON_FORMAT = {
                  code: 8,
                  name: "JsonFormat",
                  message: "Not a valid Json content submitted"
                }
  PAYLOAD_CONTENT = {
                  code: 9,
                  name: "PayloadContentInvalid",
                  message: "Submitted payload parameter is not valid"
                }
  INVALID_DIGEST = {
                  code: 4,
                  name: "IvalidORNotAllowedDigest",
                  message: "The Digest submitted is not accepted by CA or is invalid"
                }
