You've already forked linux-packaging-mono
Imported Upstream version 4.4.0.122
Former-commit-id: a99f46acaeba3ab496c7afc02c29b839e30a0d0b
This commit is contained in:
@@ -70,3 +70,4 @@ using System.Runtime.InteropServices;
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.Providers.OldTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.Providers.DotNet, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewSystemSource, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
|
||||
[assembly: InternalsVisibleTo ("Xamarin.BoringTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000099dd12eda85767ae6f06023ee28e711c7e5a212462095c83868c29db75eddf6d8e296e03824c14fedd5f55553fed0b6173be3cc985a4b7f9fb7c83ccff8ba3938563b3d1f45a81122f12a1bcb73edcaad61a8456c7595a6da5184b4dd9d10f011b949ef1391fccfeab1ba62aa51c267ef8bd57ef1b6ba5a4c515d0badb81a78f")]
|
||||
|
@@ -21,5 +21,5 @@ EXTRA_DISTFILES = Mono.Security.Interface/README.md
|
||||
|
||||
#
|
||||
# Update this comment to trigger a build in System
|
||||
# +2
|
||||
# +3
|
||||
#
|
||||
|
@@ -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,25 +145,20 @@ namespace Mono.Security.Interface
|
||||
get { return supportsTrustAnchors; }
|
||||
}
|
||||
|
||||
static ICertificateValidator GetDefaultValidator (MonoTlsProvider provider, MonoTlsSettings settings)
|
||||
{
|
||||
return (ICertificateValidator)NoReflectionHelper.GetDefaultCertificateValidator (provider, settings);
|
||||
}
|
||||
|
||||
/*
|
||||
* Internal API, intended to be used by MonoTlsProvider implementations.
|
||||
*/
|
||||
public static ICertificateValidator GetValidator (MonoTlsProvider provider, MonoTlsSettings settings)
|
||||
internal static ICertificateValidator2 GetDefaultValidator (MonoTlsSettings settings, MonoTlsProvider provider)
|
||||
{
|
||||
return GetDefaultValidator (provider, settings);
|
||||
return (ICertificateValidator2)NoReflectionHelper.GetDefaultCertificateValidator (provider, settings);
|
||||
}
|
||||
|
||||
/*
|
||||
* Use this overloaded version in user code.
|
||||
*/
|
||||
public static ICertificateValidator GetValidator (MonoTlsSettings settings)
|
||||
public static ICertificateValidator GetValidator (MonoTlsSettings settings, MonoTlsProvider provider = null)
|
||||
{
|
||||
return GetDefaultValidator (null, settings);
|
||||
return GetDefaultValidator (settings, provider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -124,12 +124,32 @@ namespace Mono.Security.Interface
|
||||
|
||||
#endregion
|
||||
|
||||
#region Native Certificate Implementation
|
||||
|
||||
internal virtual bool HasNativeCertificates {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
internal virtual X509Certificate2Impl GetNativeCertificate (
|
||||
byte[] data, string password, X509KeyStorageFlags flags)
|
||||
{
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
|
||||
internal virtual X509Certificate2Impl GetNativeCertificate (
|
||||
X509Certificate certificate)
|
||||
{
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Certificate Validation
|
||||
|
||||
/*
|
||||
* Allows a TLS provider to provide a custom system certificiate validator.
|
||||
*/
|
||||
public virtual bool HasCustomSystemCertificateValidator {
|
||||
internal virtual bool HasCustomSystemCertificateValidator {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
@@ -142,13 +162,12 @@ namespace Mono.Security.Interface
|
||||
* Returns `true` if certificate validation has been performed and `false` to invoke the
|
||||
* default system validator.
|
||||
*/
|
||||
public virtual bool InvokeSystemCertificateValidator (
|
||||
ICertificateValidator validator, string targetHost, bool serverMode,
|
||||
X509CertificateCollection certificates, X509Chain chain, out bool success,
|
||||
ref MonoSslPolicyErrors errors, ref int status11)
|
||||
internal virtual bool InvokeSystemCertificateValidator (
|
||||
ICertificateValidator2 validator, string targetHost, bool serverMode,
|
||||
X509CertificateCollection certificates, bool wantsChain, ref X509Chain chain,
|
||||
out bool success, ref MonoSslPolicyErrors errors, ref int status11)
|
||||
{
|
||||
success = false;
|
||||
return false;
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Reference in New Issue
Block a user