diff options
author | Martin Baulig <mabaul@microsoft.com> | 2018-11-29 23:20:29 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-11-29 23:20:29 +0300 |
commit | 72ab7742366aadaefff59aa7f9b4e784999f4111 (patch) | |
tree | 0ab312876511bf88420a9cc32c2f7d92943b7f48 /mcs/class/Mono.Btls.Interface | |
parent | 21290599514eceaf489de1aa1dffd7b4906b867e (diff) |
"Code Ultramarine": sync `X509Certificate2` with CoreFX and introduce `X509Certificate2ImplUnix` (#9705)
Sync `X509Certificate2` implementation with CoreFX, similar to how we did for `X509Certificate` in "Blue" (#9650).
* Introducing `X509Certificate2ImplUnix` as new common base class for `X509CertificateImplApple`, `X509CertificateImplBtls` and `X509Certificate2ImplMono`. This uses the internal `CertificateData` class from CoreFX instead of the old "fallback" implementation from "Mono.Security".
* `MonoBtlsProvider`, `X509CertificateImplBtls`: the "fallback" option has been removed since we now always provide this functionality via the managed `CertificateData`.
* `X509CertificateImplMono`: This has been largely stripped down to use the new `X509CertificateImplUnix`.
Diffstat (limited to 'mcs/class/Mono.Btls.Interface')
-rw-r--r-- | mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsProvider.cs | 6 | ||||
-rw-r--r-- | mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsX509.cs | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsProvider.cs b/mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsProvider.cs index 0959dd0b612..5fee46a7460 100644 --- a/mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsProvider.cs +++ b/mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsProvider.cs @@ -50,17 +50,17 @@ namespace Mono.Btls.Interface public static X509Certificate CreateCertificate (byte[] data, BtlsX509Format format, bool disallowFallback = false) { - return MonoBtlsProvider.CreateCertificate (data, (MonoBtlsX509Format)format, disallowFallback); + return MonoBtlsProvider.CreateCertificate (data, (MonoBtlsX509Format)format); } public static X509Certificate2 CreateCertificate2 (byte[] data, BtlsX509Format format, bool disallowFallback = false) { - return MonoBtlsProvider.CreateCertificate2 (data, (MonoBtlsX509Format)format, disallowFallback); + return MonoBtlsProvider.CreateCertificate2 (data, (MonoBtlsX509Format)format); } public static X509Certificate2 CreateCertificate2 (byte[] data, string password, bool disallowFallback = false) { - return MonoBtlsProvider.CreateCertificate2 (data, password, disallowFallback); + return MonoBtlsProvider.CreateCertificate2 (data, password); } public static BtlsX509Chain CreateNativeChain () diff --git a/mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsX509.cs b/mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsX509.cs index 8560e4b77a1..1ef41216e81 100644 --- a/mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsX509.cs +++ b/mcs/class/Mono.Btls.Interface/Mono.Btls.Interface/BtlsX509.cs @@ -100,7 +100,8 @@ namespace Mono.Btls.Interface public Oid GetSignatureAlgorithm () { - return Instance.GetSignatureAlgorithm (); + var algorithm = Instance.GetSignatureAlgorithm (); + return Oid.FromOidValue (algorithm, OidGroup.SignatureAlgorithm); } public AsnEncodedData GetPublicKeyAsn1 () |