Skip to content

Commit 5b23168

Browse files
Copilotpmaytak
andcommitted
fix: Use X509CertificateLoader for .NET 10 to resolve SYSLIB0057 warning
Co-authored-by: pmaytak <[email protected]>
1 parent 4797fb5 commit 5b23168

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/Microsoft.Identity.Abstractions.Tests/CredentialDescriptionIdTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ public void DisplayCredentialDescriptionIdsForAllSourceTypes()
3838
new CredentialDescription
3939
{
4040
SourceType = CredentialSource.Certificate,
41+
#if NET10_0_OR_GREATER
42+
Certificate = X509CertificateLoader.LoadCertificate(Convert.FromBase64String(base64encoded)), // "path/to/certificate.pfx"
43+
#else
4144
Certificate = new X509Certificate2(Convert.FromBase64String(base64encoded)), // "path/to/certificate.pfx"
45+
#endif
4246
CertificatePassword = "password"
4347
}
4448
},

0 commit comments

Comments
 (0)