Add support for NumericString to X500DistinguishedName
authorJeremy Barton <jbarton@microsoft.com>
Sat, 22 Jun 2019 03:59:30 +0000 (20:59 -0700)
committerGitHub <noreply@github.com>
Sat, 22 Jun 2019 03:59:30 +0000 (20:59 -0700)
commit87b5983239372cfb980638b606b6bfa13058452c
treebea27e4cce364f70a7523ded469185e94aaa26b6
parent748ad60dff0b14f4aabe08f140ac74c73709cbec
Add support for NumericString to X500DistinguishedName

An X500DN which contains a valid NumericString will now not cause the
entire string to turn into the empty string; which (per the tests) matches the
Windows/NetFX behavior.

Certificates with NumericString subjects do not load on macOS, because the OS considers them invalid.

Commit migrated from https://github.com/dotnet/corefx/commit/d7631df16a92da0e21bcb64240d5007f0dab95ed
src/libraries/Common/src/System/Security/Cryptography/Asn1Reader/AsnCharacterStringEncodings.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Helpers.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/CertificateData.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ManagedCertificateFinder.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/X500NameEncoder.ManagedDecode.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/X500DistinguishedNameTests.cs