Class ParsedCertificate

java.lang.Object
fr.gouv.vitam.security.internal.common.service.ParsedCertificate

public class ParsedCertificate extends Object
Helper class for certificate parsing X509 certificates.
  • Constructor Details

    • ParsedCertificate

      public ParsedCertificate(X509Certificate x509Certificate, byte[] rawCertificate, String certificateHash)
      Constructor
      Parameters:
      x509Certificate -
      rawCertificate -
      certificateHash -
  • Method Details

    • getX509Certificate

      public X509Certificate getX509Certificate()
      Get x509Certificate
      Returns:
      x509Certificate
    • getRawCertificate

      public byte[] getRawCertificate()
      Get rawCertificate
      Returns:
      rawCertificate
    • getCertificateHash

      public String getCertificateHash()
      Get certificateHash
      Returns:
      certificateHash
    • parseCertificate

      public static ParsedCertificate parseCertificate(byte[] certificate) throws PersonalCertificateException
      Parses a certificate
      Parameters:
      certificate -
      Returns:
      the ParsedCertificate
      Throws:
      PersonalCertificateException
    • toCertificateHexString

      public static String toCertificateHexString(byte[] certificate)
      Converts a certificate to Hex for logging (Truncated to MAX_CERTIFICATE_LOG_LENGTH)
      Parameters:
      certificate -
      Returns: