Printing eror message on ssl init failed
This commit is contained in:
parent
8de9bc921f
commit
67becd9496
@ -197,14 +197,15 @@ void WebStatistics::initialize_client(const std::shared_ptr<license::web::WebSta
|
|||||||
});
|
});
|
||||||
|
|
||||||
{
|
{
|
||||||
|
std::string error{};
|
||||||
auto options = make_shared<pipes::SSL::Options>();
|
auto options = make_shared<pipes::SSL::Options>();
|
||||||
options->type = pipes::SSL::SERVER;
|
options->type = pipes::SSL::SERVER;
|
||||||
options->context_method = TLS_method();
|
options->context_method = TLS_method();
|
||||||
options->free_unused_keypairs = false; /* we dont want our keys get removed */
|
options->free_unused_keypairs = false; /* we dont want our keys get removed */
|
||||||
|
|
||||||
options->default_keypair({this->ssl->privateKey, this->ssl->certificate});
|
options->default_keypair({this->ssl->privateKey, this->ssl->certificate});
|
||||||
if(!client->pipe_ssl->initialize(options)) {
|
if(!client->pipe_ssl->initialize(options, error)) {
|
||||||
logError(LOG_LICENSE_WEB, "[{}][SSL] Failed to setup ssl! Disconnecting client", client->client_prefix());
|
logError(LOG_LICENSE_WEB, "[{}][SSL] Failed to setup ssl ({})! Disconnecting client", client->client_prefix(), error);
|
||||||
this->close_connection(client);
|
this->close_connection(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user