[Modify] Add it
This commit is contained in:
parent
4ad2864cdc
commit
4e208b7033
@ -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
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user