From 0d72ea11cc10ca3831a1f152ac13999edfe35e03 Mon Sep 17 00:00:00 2001 From: Brian Hill Date: Thu, 17 Oct 2024 14:56:46 -0400 Subject: [PATCH 1/6] fixed bug --- CscGlobalCaProxy/Client/CscGlobalClient.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CscGlobalCaProxy/Client/CscGlobalClient.cs b/CscGlobalCaProxy/Client/CscGlobalClient.cs index 962460f..291f98c 100644 --- a/CscGlobalCaProxy/Client/CscGlobalClient.cs +++ b/CscGlobalCaProxy/Client/CscGlobalClient.cs @@ -59,7 +59,7 @@ public async Task SubmitRegistrationAsync( public async Task SubmitRenewalAsync( RenewalRequest renewalRequest) { - using (var resp = await RestClient.PostAsync("/tls/renewal", new StringContent( + using (var resp = await RestClient.PostAsync("/dbs/api/v2/tls/renewal", new StringContent( JsonConvert.SerializeObject(renewalRequest), Encoding.ASCII, "application/json"))) { Logger.Trace(JsonConvert.SerializeObject(renewalRequest)); @@ -67,17 +67,22 @@ public async Task SubmitRenewalAsync( var settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; if (resp.StatusCode == HttpStatusCode.BadRequest) //Csc Sends Errors back in 400 Json Response { + var rawErrorResponse = await resp.Content.ReadAsStringAsync(); + Logger.Trace("Logging Error Response Raw"); + Logger.Trace(rawErrorResponse); var errorResponse = - JsonConvert.DeserializeObject(await resp.Content.ReadAsStringAsync(), + JsonConvert.DeserializeObject(rawErrorResponse, settings); var response = new RenewalResponse(); response.RegistrationError = errorResponse; response.Result = null; return response; } - + var rawRenewResponse = await resp.Content.ReadAsStringAsync(); + Logger.Trace("Logging Success Response Raw"); + Logger.Trace(rawRenewResponse); var renewalResponse = - JsonConvert.DeserializeObject(await resp.Content.ReadAsStringAsync()); + JsonConvert.DeserializeObject(rawRenewResponse); return renewalResponse; } } From 0d10fd3b17cc4aeca09d2c64bad6ced75f105705 Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:01:21 -0400 Subject: [PATCH 2/6] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1227ce2..58c5574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +v1.1.2 +- Fix Renewal bug referencing the wrong REST Resource V1 + v1.1.1 - Fix Revoke Serial Number Mismatch KF 10.1 and 22.1.0 GW combination - Only Syncing and GetSingleRecord on End Entity Cert to prevent errors. From 09a9aefe8fc9dcf24f770bd3382365360348879a Mon Sep 17 00:00:00 2001 From: Brian Hill Date: Mon, 21 Oct 2024 13:55:42 -0400 Subject: [PATCH 3/6] Fixed Missing UID --- CscGlobalCaProxy/RequestManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CscGlobalCaProxy/RequestManager.cs b/CscGlobalCaProxy/RequestManager.cs index 31b0231..14217c2 100644 --- a/CscGlobalCaProxy/RequestManager.cs +++ b/CscGlobalCaProxy/RequestManager.cs @@ -24,14 +24,14 @@ public EnrollmentResult GetRenewResponse(RenewalResponse renewResponse) return new EnrollmentResult { Status = 30, //failure - CARequestID = renewResponse.Result.Status.Uuid, + CARequestID = renewResponse?.Result?.Status?.Uuid, StatusMessage = renewResponse.RegistrationError.Description }; return new EnrollmentResult { Status = 13, //success - + CARequestID = renewResponse.Result.Status.Uuid, StatusMessage = $"Renewal Successfully Completed For {renewResponse.Result.CommonName}" }; } From d0c9b5fb0f19116c462fa276e9ac72ebb8bdffd5 Mon Sep 17 00:00:00 2001 From: Brian Hill Date: Mon, 21 Oct 2024 13:59:33 -0400 Subject: [PATCH 4/6] null check --- CscGlobalCaProxy/RequestManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CscGlobalCaProxy/RequestManager.cs b/CscGlobalCaProxy/RequestManager.cs index 14217c2..ff04bab 100644 --- a/CscGlobalCaProxy/RequestManager.cs +++ b/CscGlobalCaProxy/RequestManager.cs @@ -31,7 +31,7 @@ public EnrollmentResult GetRenewResponse(RenewalResponse renewResponse) return new EnrollmentResult { Status = 13, //success - CARequestID = renewResponse.Result.Status.Uuid, + CARequestID = renewResponse?.Result?.Status?.Uuid, StatusMessage = $"Renewal Successfully Completed For {renewResponse.Result.CommonName}" }; } From 311daa2c131f8c0ef8e8a6e03e0b96dcac68674d Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Tue, 14 Jan 2025 10:52:25 -0500 Subject: [PATCH 5/6] Update readme_source.md --- readme_source.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme_source.md b/readme_source.md index 9df82a1..36f31f3 100644 --- a/readme_source.md +++ b/readme_source.md @@ -1,7 +1,7 @@ *** # Getting Started ## Standard Gateway Installation -To begin, you must have the CA Gateway Service 21.3.2 installed and operational before attempting to configure the CSC Global plugin. This integration was tested with Keyfactor 8.7.0.0. +To begin, you must have the CA Gateway Service 22.1.0 installed and operational before attempting to configure the CSC Global plugin. This integration was tested with Keyfactor 10.4.0.0. To install the gateway follow these instructions. 1) Gateway Server - run the installation .msi - Get from Keyfactor From fd796cbea373d518cf6d3e8029dbb2480f313e49 Mon Sep 17 00:00:00 2001 From: Keyfactor Date: Tue, 14 Jan 2025 15:53:02 +0000 Subject: [PATCH 6/6] Update generated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a8f4aef..9f9c99c 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ This gateway extension was compiled against version of the AnyCA Gateway DCOM F *** # Getting Started ## Standard Gateway Installation -To begin, you must have the CA Gateway Service 21.3.2 installed and operational before attempting to configure the CSC Global plugin. This integration was tested with Keyfactor 8.7.0.0. +To begin, you must have the CA Gateway Service 22.1.0 installed and operational before attempting to configure the CSC Global plugin. This integration was tested with Keyfactor 10.4.0.0. To install the gateway follow these instructions. 1) Gateway Server - run the installation .msi - Get from Keyfactor