[Modify] Polish it
This commit is contained in:
parent
2486492ae7
commit
104d59cb93
@ -833,18 +833,14 @@ namespace WebSocketSharp.Server
|
|||||||
var path = _listener.CertificateFolderPath;
|
var path = _listener.CertificateFolderPath;
|
||||||
var withPort = EndPointListener.CertificateExists (_port, path);
|
var withPort = EndPointListener.CertificateExists (_port, path);
|
||||||
|
|
||||||
var both = byUser && withPort;
|
if (!(byUser || withPort)) {
|
||||||
if (both) {
|
|
||||||
_log.Warn ("The server certificate associated with the port is used.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var either = byUser || withPort;
|
|
||||||
if (!either) {
|
|
||||||
message = "There is no server certificate for secure connection.";
|
message = "There is no server certificate for secure connection.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (byUser && withPort)
|
||||||
|
_log.Warn ("The server certificate associated with the port is used.");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user