From b8a673eac7e3d880e3f743de78f8b4227aa90dce Mon Sep 17 00:00:00 2001 From: David Galey Date: Mon, 23 Jun 2025 14:55:53 -0400 Subject: [PATCH 1/6] fix for change to revocation API call --- sectigo-scm-caplugin/Client/SectigoClient.cs | 3 ++- sectigo-scm-caplugin/SectigoCAPlugin.cs | 16 ++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/sectigo-scm-caplugin/Client/SectigoClient.cs b/sectigo-scm-caplugin/Client/SectigoClient.cs index b1be02c..da9463c 100644 --- a/sectigo-scm-caplugin/Client/SectigoClient.cs +++ b/sectigo-scm-caplugin/Client/SectigoClient.cs @@ -140,10 +140,11 @@ public async Task> PageCertificates(int position = 0, int size return await ProcessResponse>(response); } - public async Task RevokeSslCertificateById(int sslId, string revreason) + public async Task RevokeSslCertificateById(int sslId, int revcode, string revreason) { JObject o = JObject.FromObject(new { + reasonCode = revcode, reason = revreason }); var response = await RestClient.PostAsJsonAsync($"api/ssl/v1/revoke/{sslId}", o); diff --git a/sectigo-scm-caplugin/SectigoCAPlugin.cs b/sectigo-scm-caplugin/SectigoCAPlugin.cs index 091cba1..1db244d 100644 --- a/sectigo-scm-caplugin/SectigoCAPlugin.cs +++ b/sectigo-scm-caplugin/SectigoCAPlugin.cs @@ -462,7 +462,7 @@ public async Task Revoke(string caRequestID, string hexSerialNumber, uint r try { var client = SectigoClient.InitializeClient(_config); - var response = Task.Run(async () => await client.RevokeSslCertificateById(int.Parse(caRequestID), RevokeReasonToString(revocationReason))).Result; + var response = Task.Run(async () => await client.RevokeSslCertificateById(int.Parse(caRequestID), (int)revocationReason, RevokeReasonToString(revocationReason))).Result; _logger.MethodExit(LogLevel.Debug); if (response)//will throw an exception if false @@ -874,26 +874,18 @@ public static string RevokeReasonToString(UInt32 revokeType) { switch (revokeType) { + case 0: + return "Unspecified"; case 1: return "Compromised Key"; - - case 2: - return "CA Compromised"; - case 3: return "Affiliation Changed"; - case 4: return "Superseded"; - case 5: return "Cessation of Operation"; - - case 6: - return "Certificate Hold"; - default: - return "Unspecified"; + throw new Exception($"Invalid revocation code: {revokeType.ToString()}. Valid values are 0,1,3-5"); } } } From 7287593c85de432eaa84b696c946e9db9e7f8bdc Mon Sep 17 00:00:00 2001 From: David Galey Date: Mon, 23 Jun 2025 14:57:01 -0400 Subject: [PATCH 2/6] changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c26956..ddea462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,4 +3,7 @@ Inital Release. Support for Enroll, Sync, and Revocation. 1.0.1 Bugfix - sync records with null serial -Bugfix - Fix for custom fields in enrollment \ No newline at end of file +Bugfix - Fix for custom fields in enrollment + +1.0.2 +Handle change to Sectigo API Revocation call \ No newline at end of file From bfca2da176a4e676d53b32d968f537f2071fca0c Mon Sep 17 00:00:00 2001 From: Macey <11599974+doebrowsk@users.noreply.github.com> Date: Mon, 30 Jun 2025 12:23:22 -0500 Subject: [PATCH 3/6] add release_project property to integration-manifest.json --- integration-manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration-manifest.json b/integration-manifest.json index a1c1f3a..6886944 100644 --- a/integration-manifest.json +++ b/integration-manifest.json @@ -9,6 +9,7 @@ "description": "Sectigo Certificate Manager plugin for the AnyCA REST Gateway framework", "gateway_framework": "24.2.0", "release_dir": "sectigo-scm-caplugin/bin/Release/net6.0", + "release_project": "sectigo-scm-caplugin/sectigo-scm-caplugin.csproj", "about": { "carest": { "ca_plugin_config": [ @@ -81,4 +82,4 @@ ] } } -} \ No newline at end of file +} From 8b913c77851c64e0eee5912828c7568233ecc390 Mon Sep 17 00:00:00 2001 From: Keyfactor Date: Mon, 30 Jun 2025 17:26:18 +0000 Subject: [PATCH 4/6] Update generated docs --- integration-manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-manifest.json b/integration-manifest.json index 6886944..6e27b1c 100644 --- a/integration-manifest.json +++ b/integration-manifest.json @@ -82,4 +82,4 @@ ] } } -} +} \ No newline at end of file From 7f57ab3475bca9b3843b07720dedd1dd36055c87 Mon Sep 17 00:00:00 2001 From: Macey <11599974+doebrowsk@users.noreply.github.com> Date: Mon, 30 Jun 2025 12:30:19 -0500 Subject: [PATCH 5/6] remove explicit net6.0 from release_dir property --- integration-manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-manifest.json b/integration-manifest.json index 6e27b1c..f0cfc2e 100644 --- a/integration-manifest.json +++ b/integration-manifest.json @@ -8,7 +8,7 @@ "update_catalog": true, "description": "Sectigo Certificate Manager plugin for the AnyCA REST Gateway framework", "gateway_framework": "24.2.0", - "release_dir": "sectigo-scm-caplugin/bin/Release/net6.0", + "release_dir": "sectigo-scm-caplugin/bin/Release", "release_project": "sectigo-scm-caplugin/sectigo-scm-caplugin.csproj", "about": { "carest": { @@ -82,4 +82,4 @@ ] } } -} \ No newline at end of file +} From 803b985521d3a768eaa28289e98b0592e21c2a9d Mon Sep 17 00:00:00 2001 From: Keyfactor Date: Mon, 30 Jun 2025 17:33:03 +0000 Subject: [PATCH 6/6] Update generated docs --- integration-manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-manifest.json b/integration-manifest.json index f0cfc2e..aba2711 100644 --- a/integration-manifest.json +++ b/integration-manifest.json @@ -82,4 +82,4 @@ ] } } -} +} \ No newline at end of file