[Modify] Polish them
This commit is contained in:
parent
5221933e32
commit
e1e40f97de
@ -834,9 +834,6 @@ namespace WebSocketSharp.Server
|
|||||||
{
|
{
|
||||||
message = null;
|
message = null;
|
||||||
|
|
||||||
if (!_secure)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
var byUser = _listener.SslConfiguration.ServerCertificate != null;
|
var byUser = _listener.SslConfiguration.ServerCertificate != null;
|
||||||
|
|
||||||
var path = _listener.CertificateFolderPath;
|
var path = _listener.CertificateFolderPath;
|
||||||
@ -844,13 +841,13 @@ namespace WebSocketSharp.Server
|
|||||||
|
|
||||||
var both = byUser && withPort;
|
var both = byUser && withPort;
|
||||||
if (both) {
|
if (both) {
|
||||||
_log.Warn ("The certificate associated with the port will be used.");
|
_log.Warn ("A server certificate associated with the port is used.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var either = byUser || withPort;
|
var either = byUser || withPort;
|
||||||
if (!either) {
|
if (!either) {
|
||||||
message = "There is no certificate used to authenticate the server.";
|
message = "There is no server certificate for secure connections.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1475,9 +1472,11 @@ namespace WebSocketSharp.Server
|
|||||||
/// </exception>
|
/// </exception>
|
||||||
public void Start ()
|
public void Start ()
|
||||||
{
|
{
|
||||||
string msg;
|
if (_secure) {
|
||||||
if (!checkCertificate (out msg))
|
string msg;
|
||||||
throw new InvalidOperationException (msg);
|
if (!checkCertificate (out msg))
|
||||||
|
throw new InvalidOperationException (msg);
|
||||||
|
}
|
||||||
|
|
||||||
start ();
|
start ();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user