namespace Mono.Security.Interface
{
- #if (!MONOTOUCH && !MONODROID) || INSIDE_SYSTEM
public class ValidationResult
{
bool trusted;
this.policy_errors = policy_errors;
}
- internal ValidationResult (bool trusted, bool user_defined, int error_code)
+ internal ValidationResult (bool trusted, bool user_denied, int error_code)
{
this.trusted = trusted;
this.user_denied = user_denied;
this.error_code = error_code;
- this.policy_errors = policy_errors;
}
public bool Trusted {
* 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.
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 GetInternalValidator (MonoTlsSettings settings, MonoTlsProvider provider)
+ {
+ return (ICertificateValidator2)NoReflectionHelper.GetInternalValidator (provider, settings);
+ }
+
+ [Obsolete ("Use GetInternalValidator")]
+ internal static ICertificateValidator2 GetDefaultValidator (MonoTlsSettings settings, MonoTlsProvider provider)
{
- return GetDefaultValidator (provider, settings);
+ return GetInternalValidator (settings, provider);
}
/*
*/
public static ICertificateValidator GetValidator (MonoTlsSettings settings)
{
- return GetDefaultValidator (null, settings);
+ return (ICertificateValidator)NoReflectionHelper.GetDefaultValidator (settings);
}
}
-#endif
}