case 4586 - bouncycastle and also had to do mailkit as it was providing an old version of bounceycastle causing conflict

This commit is contained in:
2024-05-09 19:53:39 +00:00
parent 13644fc935
commit 7cd16e460f
2 changed files with 9 additions and 5 deletions

View File

@@ -11,9 +11,12 @@ using System.Linq;
using Microsoft.Extensions.Logging;
using Microsoft.EntityFrameworkCore;
//JSON KEY
using Org.BouncyCastle.Security;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
//JSON KEY
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -963,7 +966,7 @@ EQIDAQAB
PemReader pr = new PemReader(new StringReader(publicPem));
var KeyParameter = (Org.BouncyCastle.Crypto.AsymmetricKeyParameter)pr.ReadObject();
var KeyParameter = (AsymmetricKeyParameter)pr.ReadObject();
var signer = SignerUtilities.GetSigner("SHA256WITHRSA");
signer.Init(false, KeyParameter);
var expectedSig = Convert.FromBase64String(keySig);