Skip to content

Commit

Permalink
Fix tests for X509Certificate2 deprecation in net9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Keegan Caruso committed Aug 14, 2024
1 parent 3b23d7c commit 941bc90
Show file tree
Hide file tree
Showing 11 changed files with 112 additions and 67 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Security.Cryptography.X509Certificates;
using Microsoft.IdentityModel.TestUtils;
using Xunit;

Expand All @@ -17,7 +15,7 @@ public void ClientCertificates()
Assert.NotNull(httpRequestData.ClientCertificates);
Assert.Empty(httpRequestData.ClientCertificates);

var cert = new X509Certificate2(Convert.FromBase64String(KeyingMaterial.AADCertData));
var cert = X509Helper.ConvertToX509Certificate(KeyingMaterial.AADCertData);
httpRequestData.ClientCertificates.Add(cert);

Assert.Single(httpRequestData.ClientCertificates);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Security.Claims;
using System.Security.Cryptography.X509Certificates;
using Microsoft.IdentityModel.TestUtils;
using Microsoft.IdentityModel.Tokens;
using Microsoft.IdentityModel.Tokens.Saml;
Expand Down Expand Up @@ -143,7 +142,7 @@ public static TheoryData<WsFederationSigninMessageTheoryData> WaSignInTheoryData
{
TokenValidationParameters = new TokenValidationParameters
{
IssuerSigningKey = new X509SecurityKey(new X509Certificate2(Convert.FromBase64String(_x509DataADFS))),
IssuerSigningKey = new X509SecurityKey(X509Helper.ConvertToX509Certificate(_x509DataADFS)),
ValidIssuer = "http://sts.sub2.fracas365.msftonlinerepro.com/adfs/services/trust",
ValidAudience = "https://app1.sub2.fracas365.msftonlinerepro.com/sampapp/",
ValidateLifetime = false,
Expand Down
4 changes: 2 additions & 2 deletions test/Microsoft.IdentityModel.TestUtils/Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public static string Binding
get => "http://www.w3.org/";
}

public static X509Certificate2 Certificate => new X509Certificate2(Convert.FromBase64String(CertificateData));
public static X509Certificate2 Certificate => X509Helper.ConvertToX509Certificate(CertificateData);

public static string CertificateData
{
Expand Down Expand Up @@ -267,7 +267,7 @@ public static KeyInfo KeyInfo
get
{
var keyInfo = new KeyInfo();
keyInfo.X509Data.Add(new X509Data(new X509Certificate2(Convert.FromBase64String(CertificateData))));
keyInfo.X509Data.Add(new X509Data(X509Helper.ConvertToX509Certificate(CertificateData)));
return keyInfo;
}
}
Expand Down
48 changes: 24 additions & 24 deletions test/Microsoft.IdentityModel.TestUtils/KeyingMaterial.cs

Large diffs are not rendered by default.

27 changes: 13 additions & 14 deletions test/Microsoft.IdentityModel.TestUtils/ReferenceMetadata.cs

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions test/Microsoft.IdentityModel.TestUtils/TestSets.cs

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions test/Microsoft.IdentityModel.TestUtils/X509Helper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Cryptography.X509Certificates;

namespace Microsoft.IdentityModel.TestUtils
{
public static class X509Helper
{
public static X509Certificate2 ConvertToX509Certificate(string base64Data)
{
var base64Bytes = Convert.FromBase64String(base64Data);

#if NET9_0_OR_GREATER
return X509CertificateLoader.LoadCertificate(base64Bytes);
#else
return new X509Certificate2(base64Bytes);
#endif
}

public static X509Certificate2 ConvertToX509Certificate(string base64Data, SecureString securePassword, X509KeyStorageFlags flags = X509KeyStorageFlags.DefaultKeySet)
{
var password = ConvertFromSecureString(securePassword);
return ConvertToX509Certificate(base64Data, password, flags);
}

public static X509Certificate2 ConvertToX509Certificate(string base64Data, string password, X509KeyStorageFlags flags = X509KeyStorageFlags.DefaultKeySet)
{
var base64Bytes = Convert.FromBase64String(base64Data);
#if NET9_0_OR_GREATER
return X509CertificateLoader.LoadPkcs12(base64Bytes, password, flags);
#else
return new X509Certificate2(base64Bytes, password);
#endif
}

private static string ConvertFromSecureString(SecureString secureString)
{
IntPtr valuePtr = IntPtr.Zero;
try
{
valuePtr = Marshal.SecureStringToGlobalAllocUnicode(secureString);
return Marshal.PtrToStringUni(valuePtr);
}
finally
{
Marshal.ZeroFreeGlobalAllocUnicode(valuePtr);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Security.Claims;
using System.Security.Cryptography.X509Certificates;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
using Microsoft.IdentityModel.Protocols.WsFederation;
using Microsoft.IdentityModel.Tokens;
Expand Down Expand Up @@ -647,8 +646,8 @@ public void CompareX509Certificate2()
TestUtilities.WriteHeader($"{this}.CompareX509Certificate2", true);

var context = new CompareContext($"{this}.CompareX509Certificate2");
var certificate = new X509Certificate2(Convert.FromBase64String(KeyingMaterial.DefaultX509Data_2048_Public));
var certificateSame = new X509Certificate2(Convert.FromBase64String(KeyingMaterial.DefaultX509Data_2048_Public));
var certificate = X509Helper.ConvertToX509Certificate(KeyingMaterial.DefaultX509Data_2048_Public);
var certificateSame = X509Helper.ConvertToX509Certificate(KeyingMaterial.DefaultX509Data_2048_Public);
var certificateDifferent = KeyingMaterial.CertSelfSigned1024_SHA256;

IdentityComparer.AreEqual(certificate, certificateSame, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using Microsoft.IdentityModel.TestUtils;
using Xunit;

Expand Down Expand Up @@ -426,7 +425,7 @@ private static X509SecurityKey CreateX509SecurityKey(JsonWebKeySet webKeySet, in
{
var webKey = (webKeySet.Keys as List<JsonWebKey>)[keyIndex];

return new X509SecurityKey(new X509Certificate2(Convert.FromBase64String(webKey.X5c[0])))
return new X509SecurityKey(X509Helper.ConvertToX509Certificate(webKey.X5c[0]))
{
KeyId = webKey.KeyId
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Xml;
using Microsoft.IdentityModel.TestUtils;
Expand Down Expand Up @@ -213,8 +212,8 @@ public static TheoryData<EnvelopedSignatureTheoryData> ReadXmlElementsTheoryData
var samlString = CreateSamlTokenString();
var saml2String = CreateSaml2TokenString();
var samlpMesage = File.ReadAllText("SamlpMessage.xml");
var samlpTokenKey = new X509SecurityKey(new X509Certificate2(Convert.FromBase64String("MIIGvzCCBKegAwIBAgICAZUwDQYJKoZIhvcNAQELBQAwgYYxCzAJBgNVBAYTAkNaMQ8wDQYDVQQHEwZQcmFndWUxGTAXBgNVBAoTEENaLk5JQywgei5zLnAuby4xMTAvBgNVBAMTKENaLk5JQyBTSEEyIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxGDAWBgkqhkiG9w0BCQEWCWNhQG5pYy5jejAeFw0xODAyMDYxMDM5MDJaFw0yMDAyMDYxMDM5MDJaMH0xCzAJBgNVBAYTAkNaMQ8wDQYDVQQHEwZQcmFndWUxDzANBgNVBAoTBkNaLk5JQzEwMC4GA1UEAxMnbW9qZWlkLnJlZ3Rlc3QubmljLmN6IHNpZGFzYW1sIG1ldGFkYXRhMRowGAYJKoZIhvcNAQkBFgtyb290QG5pYy5jejCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANUq8haz+ZNnLBWRLPLQKSyg7TlQDVyLxxMmxFhCT8OXArkjIsZvcwNNeMDB6aOhk0Zs97t+7lEgC2MuiY9GnoC0DV+TAUf7+MzlHuE0oCmR9jiJPsikBEsRDHpvHi9rZv4HK2TCsee/5dDi7tP7bMnRvDOAt7lR+KuLQNaXtDWrXC4bjeNdO/mcy3UeKy+dW2Diqz8YMbRrxM29wAweaUSJ6npU9KTnx0/dq/+IM4R1gO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LRXsidwrObwyAKLSFJoh/uxWT85JgAoekq5zBen94HfELfMEc9tex6Qlf1tLDs7OWD6Mlw6j9aAcw/4Nfh"));
var xmlWithTwoSamlTokens = CreateSignedXmlWithEmbededTokens(new List<SecurityToken> { CreateSamlToken(), CreateSamlToken() }, Default.SymmetricSigningCredentials, Default.AsymmetricSigningCredentials);
var xmlWithSamlAndSaml2Tokens = CreateSignedXmlWithEmbededTokens(new List<SecurityToken> { CreateSamlToken(), CreateSaml2Token() }, Default.SymmetricSigningCredentials, Default.AsymmetricSigningCredentials);
var xmlWithSaml2AndSamlTokens = CreateSignedXmlWithEmbededTokens(new List<SecurityToken> { CreateSaml2Token(), CreateSamlToken() }, Default.SymmetricSigningCredentials, Default.AsymmetricSigningCredentials);
Expand Down
Loading

0 comments on commit 941bc90

Please sign in to comment.