Class ParsedCertificate
- java.lang.Object
-
- fr.gouv.vitam.security.internal.common.service.ParsedCertificate
-
public class ParsedCertificate extends java.lang.Object
Helper class for certificate parsing X509 certificates.
-
-
Constructor Summary
Constructors Constructor Description ParsedCertificate(java.security.cert.X509Certificate x509Certificate, byte[] rawCertificate, java.lang.String certificateHash)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCertificateHash()
Get certificateHashbyte[]
getRawCertificate()
Get rawCertificatejava.security.cert.X509Certificate
getX509Certificate()
Get x509Certificatestatic ParsedCertificate
parseCertificate(byte[] certificate)
Parses a certificatestatic java.lang.String
toCertificateHexString(byte[] certificate)
Converts a certificate to Hex for logging (Truncated to MAX_CERTIFICATE_LOG_LENGTH)
-
-
-
Method Detail
-
getX509Certificate
public java.security.cert.X509Certificate getX509Certificate()
Get x509Certificate- Returns:
- x509Certificate
-
getRawCertificate
public byte[] getRawCertificate()
Get rawCertificate- Returns:
- rawCertificate
-
getCertificateHash
public java.lang.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 java.lang.String toCertificateHexString(byte[] certificate)
Converts a certificate to Hex for logging (Truncated to MAX_CERTIFICATE_LOG_LENGTH)- Parameters:
certificate
-- Returns:
-
-