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 {