[Mono.Security.Interface]: Improve synergy between `SslStream` and `IMonoSslStream...
authorMartin Baulig <mabaul@microsoft.com>
Wed, 26 Apr 2017 21:15:37 +0000 (17:15 -0400)
committerGitHub <noreply@github.com>
Wed, 26 Apr 2017 21:15:37 +0000 (17:15 -0400)
commitcb885fe3e0aca53c464c118c636558c108bd2e0e
tree685a986e5415263f9ac1cfd78a2f531e3834b3b8
parent22b6b9581418260397b701c17b16c3eb55136de7
[Mono.Security.Interface]: Improve synergy between `SslStream` and `IMonoSslStream` (#4756)

* [Mono.Security.Interface]: Improve synergy between `MonoTlsProvider`, `SslStream` and `IMonoSslStream`.

* Add `IMonoSslStream.SslStream` property; the `IMonoSslStream` is now only created my the `SslStream`
  constructor, so `SslStream` "owns" the `IMonoSslStream`.

* Add internal `MonoTlsProvider.CreateSslStreamInternal()`.

* `SslStream` does not need to implement any additional interfaces; we can do without after
   getting rid of the wrapper classes.

* Add internal `SslStream.CreateMonoSslStream(Stream,bool,MonoTlsProvider,MonoTlsSettings)`.

* `MonoTlsProvider.CreateSslStream()` implementations should use this new method.

* Remove ancient obsolete MonoTlsProviderFactory APIs.

* `HttpListener` and `HttpConnection` now use `SslStream` instead of `IMonoSslStream`.

* [System]: Cleanup internal TLS Provider registration.

* Make it build.
22 files changed:
mcs/class/Mono.Security/Mono.Security.Interface/IMonoSslStream.cs
mcs/class/Mono.Security/Mono.Security.Interface/MonoTlsProvider.cs
mcs/class/Mono.Security/Mono.Security.Interface/MonoTlsProviderFactory.cs
mcs/class/System/Mono.AppleTls/AppleTlsProvider.cs
mcs/class/System/Mono.AppleTls/AppleTlsStream.cs
mcs/class/System/Mono.Btls/MonoBtlsProvider.cs
mcs/class/System/Mono.Btls/MonoBtlsStream.cs
mcs/class/System/Mono.Net.Security/LegacySslStream.cs
mcs/class/System/Mono.Net.Security/LegacyTlsProvider.cs
mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs
mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Apple.cs [deleted file]
mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Droid.cs [deleted file]
mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.cs
mcs/class/System/Mono.Net.Security/NoReflectionHelper.cs
mcs/class/System/System.Net.Security/SslStream.cs
mcs/class/System/System.Net/HttpConnection.cs
mcs/class/System/System.Net/HttpListener.cs
mcs/class/System/monodroid_System.dll.sources
mcs/class/System/monotouch_System.dll.sources
mcs/class/System/monotouch_watch_System.dll.exclude.sources
mcs/class/System/xammac_System.dll.sources
mcs/class/System/xammac_net_4_5_System.dll.sources