[Modify] Add it

This commit is contained in:
sta 2017-06-03 15:55:16 +09:00
parent 4ad2864cdc
commit 4e208b7033

View File

@ -623,6 +623,31 @@ namespace WebSocketSharp.Server
_state = ServerState.Stop; _state = ServerState.Stop;
} }
private bool checkCertificate (out string message)
{
message = null;
if (!_secure)
return true;
var user = _listener.SslConfiguration.ServerCertificate != null;
var path = _listener.CertificateFolderPath;
var port = EndPointListener.CertificateExists (_port, path);
if (user && port) {
_log.Warn ("The certificate associated with the port will be used.");
return true;
}
if (!(user || port)) {
message = "There is no certificate.";
return false;
}
return true;
}
private bool checkIfAvailable ( private bool checkIfAvailable (
bool ready, bool start, bool shutting, bool stop, out string message bool ready, bool start, bool shutting, bool stop, out string message
) )