[Modify] Polish it
This commit is contained in:
parent
2e59e80b09
commit
238ecd1250
@ -824,12 +824,17 @@ namespace WebSocketSharp.Server
|
|||||||
var path = _listener.CertificateFolderPath;
|
var path = _listener.CertificateFolderPath;
|
||||||
var withPort = EndPointListener.CertificateExists (_port, path);
|
var withPort = EndPointListener.CertificateExists (_port, path);
|
||||||
|
|
||||||
if (!(byUser || withPort)) {
|
var exists = byUser || withPort;
|
||||||
|
|
||||||
|
if (!exists) {
|
||||||
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)
|
var both = byUser && withPort;
|
||||||
|
|
||||||
|
if (both)
|
||||||
_log.Warn ("The server certificate associated with the port is used.");
|
_log.Warn ("The server certificate associated with the port is used.");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user