From 0de32bbacc8297407baff77e0541c807ac98a4c6 Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 1 Nov 2014 12:26:32 +0900 Subject: [PATCH] Fix for pull request #85, modified a few for WebSocketServer.SslConfiguration property --- Example2/Program.cs | 4 ++-- websocket-sharp/Server/WebSocketServer.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Example2/Program.cs b/Example2/Program.cs index ace957af..614b29d3 100644 --- a/Example2/Program.cs +++ b/Example2/Program.cs @@ -29,8 +29,8 @@ namespace Example2 #endif /* To provide the secure connection. var cert = ConfigurationManager.AppSettings["ServerCertFile"]; - var password = ConfigurationManager.AppSettings["CertFilePassword"]; - wssv.Certificate = new X509Certificate2 (cert, password); + var passwd = ConfigurationManager.AppSettings["CertFilePassword"]; + wssv.SslConfiguration.ServerCertificate = new X509Certificate2 (cert, passwd); */ /* To provide the HTTP Authentication (Basic/Digest). diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index f6db7c41..5e1c7c31 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -442,15 +442,15 @@ namespace WebSocketSharp.Server /// /// Gets or sets the SSL configuration used to authenticate the server and optionally the client - /// on the secure connection. + /// for secure connection. /// /// - /// A that represents the SSL configuration used to - /// authenticate the server and optionally the client. + /// A that represents the configuration used to + /// authenticate the server and optionally the client for secure connection. /// public ServerSslAuthConfiguration SslConfiguration { get { - return _sslConfig; + return _sslConfig ?? (_sslConfig = new ServerSslAuthConfiguration (null)); } set {