From 73e8d31d6144aea40671ae7b72097c6501def212 Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 6 May 2017 15:24:51 +0900 Subject: [PATCH] [Modify] Add it --- websocket-sharp/Net/HttpListener.cs | 2 +- websocket-sharp/Net/ServerSslConfiguration.cs | 16 ++++++++++++++++ websocket-sharp/Server/WebSocketServer.cs | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Net/HttpListener.cs b/websocket-sharp/Net/HttpListener.cs index c8334987..07970e14 100644 --- a/websocket-sharp/Net/HttpListener.cs +++ b/websocket-sharp/Net/HttpListener.cs @@ -352,7 +352,7 @@ namespace WebSocketSharp.Net public ServerSslConfiguration SslConfiguration { get { CheckDisposed (); - return _sslConfig ?? (_sslConfig = new ServerSslConfiguration (null)); + return _sslConfig ?? (_sslConfig = new ServerSslConfiguration ()); } set { diff --git a/websocket-sharp/Net/ServerSslConfiguration.cs b/websocket-sharp/Net/ServerSslConfiguration.cs index c10b4dc1..e52d33df 100644 --- a/websocket-sharp/Net/ServerSslConfiguration.cs +++ b/websocket-sharp/Net/ServerSslConfiguration.cs @@ -79,6 +79,22 @@ namespace WebSocketSharp.Net { } + /// + /// Copies the parameters from the specified to + /// a new instance of the class. + /// + /// + /// A from which to copy. + /// + public ServerSslConfiguration (ServerSslConfiguration configuration) + { + _checkCertRevocation = configuration._checkCertRevocation; + _clientCertRequired = configuration._clientCertRequired; + _clientCertValidationCallback = configuration._clientCertValidationCallback; + _enabledSslProtocols = configuration._enabledSslProtocols; + _serverCert = configuration._serverCert; + } + /// /// Initializes a new instance of the class /// with the specified , diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index 92b07495..e2829f35 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -583,7 +583,7 @@ namespace WebSocketSharp.Server public ServerSslConfiguration SslConfiguration { get { if (_sslConfig == null) - _sslConfig = new ServerSslConfiguration (null); + _sslConfig = new ServerSslConfiguration (); return _sslConfig; }