Skip to content

Commit 045afcd

Browse files
authored
Load certs by issuer #49062 (#50474)
1 parent 1799368 commit 045afcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Servers/Kestrel/Core/src/CertificateLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static X509Certificate2 LoadFromStoreCert(string subject, string storeNam
4848
// Pick the first one if there's no exact match as a fallback to substring default.
4949
foundCertificate ??= certificate;
5050

51-
if (certificate.GetNameInfo(X509NameType.SimpleName, true).Equals(subject, StringComparison.InvariantCultureIgnoreCase))
51+
if (certificate.GetNameInfo(X509NameType.SimpleName, forIssuer: false).Equals(subject, StringComparison.InvariantCultureIgnoreCase))
5252
{
5353
foundCertificate = certificate;
5454
break;

0 commit comments

Comments
 (0)