use of com.intel.mtwilson.util.x509.X509CertificateFormatException in project OpenAttestation by OpenAttestation.
the class Certificate method getX509Certificate.
@JsonIgnore
@Override
public X509Certificate getX509Certificate() {
if (certificate == null) {
return null;
}
try {
log.debug("Certificate bytes length {}", certificate.length);
log.info("Certificate bytes length {}", certificate.length);
return X509Util.decodeDerCertificate(certificate);
} catch (CertificateException e) {
// throw new ASException(ce, ErrorCode.MS_CERTIFICATE_ENCODING_ERROR, ce.getClass().getSimpleName());
throw new X509CertificateFormatException(e, certificate);
}
}
Aggregations