use of com.venafi.vcert.sdk.connectors.ConnectorException.CouldNotParseRevokeReasonException in project vcert-java by Venafi.
the class TppConnector method revokeCertificate.
@Override
public void revokeCertificate(RevocationRequest request) throws VCertException {
Integer reason = revocationReasons.get(request.reason());
if (reason == null)
throw new CouldNotParseRevokeReasonException(request.reason());
CertificateRevokeRequest revokeRequest = new CertificateRevokeRequest().certificateDN(request.certificateDN()).thumbprint(request.thumbprint()).reason(reason).comments(request.comments()).disable(request.disable());
Tpp.CertificateRevokeResponse revokeResponse = revokeCertificate(revokeRequest);
if (!revokeResponse.success())
throw new RevokeFailureException(revokeResponse.error());
}
Aggregations