Class ParsedCertificate
java.lang.Object
fr.gouv.vitam.security.internal.common.service.ParsedCertificate
Helper class for certificate parsing X509 certificates.
-
Constructor Summary
ConstructorDescriptionParsedCertificate
(X509Certificate x509Certificate, byte[] rawCertificate, String certificateHash) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet certificateHashbyte[]
Get rawCertificateGet x509Certificatestatic ParsedCertificate
parseCertificate
(byte[] certificate) Parses a certificatestatic String
toCertificateHexString
(byte[] certificate) Converts a certificate to Hex for logging (Truncated to MAX_CERTIFICATE_LOG_LENGTH)
-
Constructor Details
-
ParsedCertificate
public ParsedCertificate(X509Certificate x509Certificate, byte[] rawCertificate, String certificateHash) Constructor- Parameters:
x509Certificate
-rawCertificate
-certificateHash
-
-
-
Method Details
-
getX509Certificate
Get x509Certificate- Returns:
- x509Certificate
-
getRawCertificate
public byte[] getRawCertificate()Get rawCertificate- Returns:
- rawCertificate
-
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
Converts a certificate to Hex for logging (Truncated to MAX_CERTIFICATE_LOG_LENGTH)- Parameters:
certificate
-- Returns:
-