diff options
author | Martin Baulig <martin.baulig@xamarin.com> | 2016-04-07 16:55:27 +0300 |
---|---|---|
committer | Martin Baulig <martin.baulig@xamarin.com> | 2016-04-07 17:42:10 +0300 |
commit | 8527bb09ec2d7b63af40770af38c83ed6bc68d75 (patch) | |
tree | 3fec9ee9590a3ce5a9c0a884d409eb454bbd1622 /mcs/class/Mono.Security/Mono.Security.Interface/CertificateValidationHelper.cs | |
parent | 7ac71b1dbf0f02f34711d2c37d43f7d946fdb985 (diff) |
[BoringTls]: Merge the work branch.
* Mono.Security.Interface.ICertificateValidator2:
new internal interface, deriving from ICertificateValidator.
* Mono.Security.Interface.CertificateValidationHelper:
the internal GetValidator() now returns ICertificateValidator2.
* Mono.Security.Interface.MonoTlsProvider:
make HasCustomSystemCertificateValidator and InvokeSystemCertificateValidator()
internal and use ICertificateValidator2.
* Mono.Net.Security.ChainValidator:
implement ICertificateValidator2; we may now be called with a
fully-built X509Chain.
* corlib, System, Mono.Security:
add [assembly: InternalsVisibleTo].
Diffstat (limited to 'mcs/class/Mono.Security/Mono.Security.Interface/CertificateValidationHelper.cs')
-rw-r--r-- | mcs/class/Mono.Security/Mono.Security.Interface/CertificateValidationHelper.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mcs/class/Mono.Security/Mono.Security.Interface/CertificateValidationHelper.cs b/mcs/class/Mono.Security/Mono.Security.Interface/CertificateValidationHelper.cs index fc901084a70..561e7888db7 100644 --- a/mcs/class/Mono.Security/Mono.Security.Interface/CertificateValidationHelper.cs +++ b/mcs/class/Mono.Security/Mono.Security.Interface/CertificateValidationHelper.cs @@ -95,6 +95,14 @@ namespace Mono.Security.Interface * If @serverMode is true, then we're a server and want to validate a certificate that we received from a client. */ ValidationResult ValidateCertificate (string targetHost, bool serverMode, X509CertificateCollection certificates); + } + + internal interface ICertificateValidator2 : ICertificateValidator + { + /* + * Internal use only. + */ + ValidationResult ValidateCertificate (string targetHost, bool serverMode, X509Certificate leaf, X509Chain chain); /* * On OS X and Mobile, the @chain will be initialized with the @certificates, but not actually built. @@ -137,15 +145,15 @@ namespace Mono.Security.Interface get { return supportsTrustAnchors; } } - static ICertificateValidator GetDefaultValidator (MonoTlsProvider provider, MonoTlsSettings settings) + static ICertificateValidator2 GetDefaultValidator (MonoTlsProvider provider, MonoTlsSettings settings) { - return (ICertificateValidator)NoReflectionHelper.GetDefaultCertificateValidator (provider, settings); + return (ICertificateValidator2)NoReflectionHelper.GetDefaultCertificateValidator (provider, settings); } /* * Internal API, intended to be used by MonoTlsProvider implementations. */ - public static ICertificateValidator GetValidator (MonoTlsProvider provider, MonoTlsSettings settings) + internal static ICertificateValidator2 GetValidator (MonoTlsProvider provider, MonoTlsSettings settings) { return GetDefaultValidator (provider, settings); } |