From 22f5bd8b4a17ed8406cf0b24e54730dc70adc27d Mon Sep 17 00:00:00 2001 From: Jonas Mosbech Date: Thu, 21 Sep 2023 21:42:02 +0200 Subject: [PATCH 1/2] Fix loading of private key to avoid "Invalid signature algorithm" error See https://github.com/digst/OIOIDWS.Net/issues/35#issuecomment-1525541225 --- Source/Digst.OioIdws.OioWsTrust/Utils/XmlSignatureUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Digst.OioIdws.OioWsTrust/Utils/XmlSignatureUtils.cs b/Source/Digst.OioIdws.OioWsTrust/Utils/XmlSignatureUtils.cs index 2b77572..8a60207 100644 --- a/Source/Digst.OioIdws.OioWsTrust/Utils/XmlSignatureUtils.cs +++ b/Source/Digst.OioIdws.OioWsTrust/Utils/XmlSignatureUtils.cs @@ -32,7 +32,7 @@ public static XDocument SignDocument(XDocument xDoc, IEnumerable ids, X5 var signedXml = new SignedXmlWithIdResolvement(doc); signedXml.SignedInfo.CanonicalizationMethod = SignedXml.XmlDsigExcC14NTransformUrl; signedXml.SignedInfo.SignatureMethod = RsaPkcs1Sha256SignatureDescription.XmlDsigMoreRsaSha256Url; - signedXml.SigningKey = cert.PrivateKey; + signedXml.SigningKey = cert.GetRSAPrivateKey(); // Make a reference for each element that must be signed. foreach (var id in ids) From fd916e412045a40f8aafd4d72a1685d3a72cf171 Mon Sep 17 00:00:00 2001 From: Jonas Mosbech Date: Fri, 4 Oct 2024 11:22:13 +0200 Subject: [PATCH 2/2] Bump Nuget packages --- .../Digst.OioIdws.Rest.Client.csproj | 7 +++---- Source/Digst.OioIdws.Rest.Client/packages.config | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Digst.OioIdws.Rest.Client/Digst.OioIdws.Rest.Client.csproj b/Source/Digst.OioIdws.Rest.Client/Digst.OioIdws.Rest.Client.csproj index fa3ccc0..0b57265 100644 --- a/Source/Digst.OioIdws.Rest.Client/Digst.OioIdws.Rest.Client.csproj +++ b/Source/Digst.OioIdws.Rest.Client/Digst.OioIdws.Rest.Client.csproj @@ -33,9 +33,8 @@ bin\Release\Digst.OioIdws.Rest.Client.xml - - ..\..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll - True + + ..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll @@ -76,10 +75,10 @@ Designer - + diff --git a/Source/Digst.OioIdws.Rest.Client/packages.config b/Source/Digst.OioIdws.Rest.Client/packages.config index 284ec0a..fef83be 100644 --- a/Source/Digst.OioIdws.Rest.Client/packages.config +++ b/Source/Digst.OioIdws.Rest.Client/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file