Use OID constructor for certificate SignatureAlgorithm.
authorKevin Jones <kevin@vcsjones.com>
Tue, 17 Aug 2021 15:58:13 +0000 (11:58 -0400)
committerGitHub <noreply@github.com>
Tue, 17 Aug 2021 15:58:13 +0000 (08:58 -0700)
commitbbf4e797a13984acee37b19d0a79217188824301
treece33288260f23da359b67709faf165a1095ba70d
parent492a5201fdb26eae5288fd6653945a689a601f3a
Use OID constructor for certificate SignatureAlgorithm.

This fixes an issue where it was not possible to get the SignatureAlgorithm
on Windows if the signature algorithm does not have a FriendlyName, like
a GOST certificate. This changes the SignatureAlgorithm property to use the
OID constructor so that the value can always be accessed, and the FriendlyName
is lazily resolve when the property is accessed.
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/CertTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/TestData.cs