Start migration of S.S.C.X509Certificates to new Asn.1 APIs
authorFilip Navara <filip.navara@gmail.com>
Thu, 2 Aug 2018 18:06:59 +0000 (20:06 +0200)
committerJeremy Barton <jbarton@microsoft.com>
Thu, 2 Aug 2018 18:06:59 +0000 (11:06 -0700)
commit013e46981db76f5f0cd4f534cd21aa14e827929c
treea59d3a955bda8eac77f092fd9283dea3e438ba86
parent218f597b430d65e6b6e084a93faaa30fdaf3383d
Start migration of S.S.C.X509Certificates to new Asn.1 APIs

* Read/write X509 extensions using the new ASN classes.
  * Change to accept BER, because netfx accepted it.
* Migrate AppleCertificatePal's CertificateData to new ASN classes.
* Migrate CertificateRequest to new ASN classes.
* Update PKCSdotnet/corefx#9 and PKCSdotnet/corefx#10 serialization to use new ASN.1 classes.
* Add test for normalizing zero-only serial number.
* Reimplement RSAPssX509SignatureGenerator using AsnSerializer.
* Reuse PssParamAsn from S.S.C.Pkcs.

Commit migrated from https://github.com/dotnet/corefx/commit/9853efb2db2063621a40612dc66adc06188b8778
26 files changed:
src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs
src/libraries/Common/src/System/Security/Cryptography/Asn1/PssParamsAsn.cs [moved from src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Asn1/PssParamsAsn.cs with 90% similarity]
src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/EncodingHelpers.cs [deleted file]
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/ManagedX509ExtensionProcessor.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/X500NameEncoder.ManagedDecode.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/Resources/Strings.resx
src/libraries/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Asn1/BasicConstraintsAsn.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Asn1/CertificateAsn.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Asn1/CertificationRequestAsn.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Asn1/CertificationRequestInfoAsn.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Asn1/KeyUsageFlagsAsn.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Asn1/TbsCertificateAsn.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Asn1/TimeAsn.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Asn1/ValidityAsn.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Asn1/X501AttributeAsn.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/CertificateRequest.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Pkcs10CertificationRequestInfo.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/Pkcs9ExtensionRequest.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/RSAPssX509SignatureGenerator.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/TbsCertificate.cs [deleted file]
src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestUsageTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/ExtensionsTests.cs