Fix wrong comparison in CertificateProvider (#9987)
This commit is contained in:
parent
4967416067
commit
fae03446dc
@ -3204,8 +3204,8 @@ namespace Microsoft.PowerShell.Commands
|
||||
// extract DNS name from subject distinguish name
|
||||
// if it exists and does not contain a comma
|
||||
// a comma, indicates it is not a DNS name
|
||||
if (cert.Subject.StartsWith(distinguishedNamePrefix, System.StringComparison.InvariantCultureIgnoreCase) &&
|
||||
cert.Subject.IndexOf(",", System.StringComparison.InvariantCulture) == -1)
|
||||
if (cert.Subject.StartsWith(distinguishedNamePrefix, System.StringComparison.OrdinalIgnoreCase) &&
|
||||
!cert.Subject.Contains(','))
|
||||
{
|
||||
name = cert.Subject.Substring(distinguishedNamePrefix.Length);
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user