Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Idnomic/IdnomicClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

// Force TLS 1.2+ (ServicePointManager is obsolete in .NET 10+, where TLS 1.2+ is the default)
#if !NET10_0_OR_GREATER
System.Net.ServicePointManager.SecurityProtocol =

Check warning on line 104 in Idnomic/IdnomicClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'ServicePointManager' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 104 in Idnomic/IdnomicClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'ServicePointManager' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 104 in Idnomic/IdnomicClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'ServicePointManager' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient.' (https://aka.ms/dotnet-warnings/SYSLIB0014)
SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;
_logger.LogTrace("SecurityProtocol set to TLS 1.2 | TLS 1.3");
#else
Expand Down Expand Up @@ -683,7 +683,10 @@

var cert = LoadCertificateFromPem(Encoding.ASCII.GetBytes(pem));
issuer = cert.Issuer;
serialNumber = cert.SerialNumber;
// Idnomic revoke API expects the canonical serial form (no leading zeros, lowercase hex).
// Without this normalization, short (e.g. 1-byte) serials such as "05" are rejected.
var canonicalSerial = cert.SerialNumber.TrimStart('0').ToLowerInvariant();
serialNumber = canonicalSerial.Length == 0 ? "0" : canonicalSerial;
reason = _requestManager.GetRevokeReasonText(revocationReason);

_logger.LogTrace("RevokeCertificate: Parsed cert. Issuer='{Issuer}', SerialNumber='{Serial}', Reason='{Reason}'",
Expand Down Expand Up @@ -931,7 +934,7 @@
#if NET10_0_OR_GREATER
return X509CertificateLoader.LoadCertificate(pemBytes);
#else
return new X509Certificate2(pemBytes);

Check warning on line 937 in Idnomic/IdnomicClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'X509Certificate2.X509Certificate2(byte[])' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.' (https://aka.ms/dotnet-warnings/SYSLIB0057)

Check warning on line 937 in Idnomic/IdnomicClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'X509Certificate2.X509Certificate2(byte[])' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.' (https://aka.ms/dotnet-warnings/SYSLIB0057)

Check warning on line 937 in Idnomic/IdnomicClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'X509Certificate2.X509Certificate2(byte[])' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.' (https://aka.ms/dotnet-warnings/SYSLIB0057)
#endif
}

Expand All @@ -940,7 +943,7 @@
#if NET10_0_OR_GREATER
return X509CertificateLoader.LoadPkcs12FromFile(path, password, flags);
#else
return new X509Certificate2(path, password, flags);

Check warning on line 946 in Idnomic/IdnomicClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'X509Certificate2.X509Certificate2(string, string?, X509KeyStorageFlags)' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.' (https://aka.ms/dotnet-warnings/SYSLIB0057)

Check warning on line 946 in Idnomic/IdnomicClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'X509Certificate2.X509Certificate2(string, string?, X509KeyStorageFlags)' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.' (https://aka.ms/dotnet-warnings/SYSLIB0057)

Check warning on line 946 in Idnomic/IdnomicClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'X509Certificate2.X509Certificate2(string, string?, X509KeyStorageFlags)' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.' (https://aka.ms/dotnet-warnings/SYSLIB0057)
#endif
}

Expand Down
Loading