Skip to content

Commit

Permalink
Fix one test on linux and hopefully it works on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmark committed Jun 7, 2022
1 parent 1859438 commit 0cfb93d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/JWT.Tests.Common/Models/TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#if NETSTANDARD2_1 || NET6_0
using System.Security.Cryptography;
using System.Text;
#endif

namespace JWT.Tests.Models
Expand Down Expand Up @@ -73,7 +72,7 @@ private static X509Certificate2 CreateCertificate()
var rsa = RSA.Create();
rsa.FromXmlString(ServerRsaPrivateKey2);

var certPub = new X509Certificate2(Encoding.ASCII.GetBytes(TestData.ServerRsaPublicKey2));
var certPub = new X509Certificate2(Convert.FromBase64String(ServerRsaPublicKey2));
var certPriv = new X509Certificate2(certPub.CopyWithPrivateKey(rsa).Export(X509ContentType.Pfx));

return certPriv;
Expand Down

0 comments on commit 0cfb93d

Please sign in to comment.