Skip to content

Commit 26c0c52

Browse files
committed
merge from main
2 parents 0ca0beb + 66a1c20 commit 26c0c52

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@
2323
* Remove caching of product ID lookups from DigiCert account
2424

2525
### 2.2.0
26-
* Add support for duplicating certs
26+
* Add support for duplicating certs
27+
28+
### 2.2.1
29+
* Properly mark 'needs_approval' status as Pending rather than Failed

digicert-certcentral-caplugin/CertCentralCAPlugin.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Keyfactor.Extensions.CAPlugin.DigiCert.Client;
66
using Keyfactor.Extensions.CAPlugin.DigiCert.Models;
77
using Keyfactor.Logging;
8+
using Keyfactor.PKI;
89
using Keyfactor.PKI.Enums;
910
using Keyfactor.PKI.Enums.EJBCA;
1011

@@ -126,12 +127,15 @@ public async Task<EnrollmentResult> Enroll(string csr, string subject, Dictionar
126127
string commonName = null, organization = null, orgUnit = null;
127128
try
128129
{
129-
subjectParsed = new X509Name(subject);
130+
subjectParsed = new X509Name(true, PKIConstants.X509.OIDLookup, subject);
130131
commonName = subjectParsed.GetValueList(X509Name.CN).Cast<string>().LastOrDefault();
131132
organization = subjectParsed.GetValueList(X509Name.O).Cast<string>().LastOrDefault();
132133
orgUnit = subjectParsed.GetValueList(X509Name.OU).Cast<string>().LastOrDefault();
133134
}
134-
catch (Exception) { }
135+
catch (Exception exc)
136+
{
137+
_logger.LogInformation($"Error while parsing subject. This might be expected. Error message: {exc.Message}");
138+
}
135139

136140
if (commonName == null)
137141
{

0 commit comments

Comments
 (0)