|
|
|
@ -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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|