[runtime] Fix the managed name of the ReRegisterForFinalize () icall.
[mono.git] / mcs / class / Mono.Security.Providers.DotNet / Mono.Security.Providers.DotNet / DotNetTlsProvider.cs
index 2fff882880aca7fa6f00a1d5ec37f0dad63a577d..3be685a46d240ac731cc9403d0c72761bc0b75ee 100644 (file)
@@ -40,15 +40,29 @@ namespace Mono.Security.Providers.DotNet
         */
        public class DotNetTlsProvider : MonoTlsProvider
        {
+               static readonly Guid id = new Guid ("3a7b3a26-0dbd-4572-a5b8-fdce766bf0dd");
+
+               public override Guid ID {
+                       get { return id; }
+               }
+
+               public override string Name {
+                       get { return "dotnet"; }
+               }
+
                public override bool SupportsSslStream {
                        get { return true; }
                }
 
+               public override bool SupportsConnectionInfo {
+                       get { return false; }
+               }
+
                public override bool SupportsMonoExtensions {
                        get { return false; }
                }
 
-               public override bool SupportsTlsContext {
+               internal override bool SupportsTlsContext {
                        get { return false; }
                }
 
@@ -56,7 +70,7 @@ namespace Mono.Security.Providers.DotNet
                        get { return (SslProtocols)ServicePointManager.SecurityProtocol; }
                }
 
-               public override MonoSslStream CreateSslStream (
+               public override IMonoSslStream CreateSslStream (
                        Stream innerStream, bool leaveInnerStreamOpen,
                        MonoTlsSettings settings = null)
                {
@@ -67,14 +81,14 @@ namespace Mono.Security.Providers.DotNet
                        LocalCertificateSelectionCallback selection_callback = null;
 
                        if (settings != null) {
-                               validation_callback = ConvertCallback (settings.ServerCertificateValidationCallback);
+                               validation_callback = ConvertCallback (settings.RemoteCertificateValidationCallback);
                                selection_callback = ConvertCallback (settings.ClientCertificateSelectionCallback);
                        }
 
-                       return new DotNetSslStreamImpl (innerStream, leaveInnerStreamOpen, validation_callback, selection_callback);
+                       return new DotNetSslStreamImpl (innerStream, leaveInnerStreamOpen, this, validation_callback, selection_callback);
                }
 
-               public override IMonoTlsContext CreateTlsContext (
+               internal override IMonoTlsContext CreateTlsContext (
                        string hostname, bool serverMode, TlsProtocols protocolFlags,
                        X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
                        bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,