Skip to content

Commit 0c051f1

Browse files
authored
Merge 9c0c255 into c98a7f5
2 parents c98a7f5 + 9c0c255 commit 0c051f1

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/EntrustRestCAProxy/EntrustCAConnector.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,15 @@ public override int Revoke(string caRequestID, string hexSerialNumber, uint revo
534534
Dictionary<string, object> connectionInfo = ConfigProvider.CAConnectionData;
535535
EntrustClient client = CreateEntrustClient(connectionInfo);
536536
string reason = Conversions.RevokeReasonToString(revocationReason);
537-
string comment = "Revoked by Entrust Gateway";
537+
string comment = $"Revoked by Entrust Gateway for the following reason: {reason}";
538538
CAConnectorCertificate cert = GetSingleRecord(caRequestID);
539+
540+
if (!string.Equals(reason, "keyCompromise"))
541+
{
542+
// Entrust no longer accepts any reason codes other than keyCompromise and unspecified.
543+
reason = "unspecified";
544+
}
545+
539546
if (!(cert.Status == (int)RequestDisposition.ISSUED))
540547
{
541548
string errorMessage = String.Format("Request {0} was not found in Entrust database or is not in a valid state to perform a revocation", caRequestID);

0 commit comments

Comments
 (0)