ssl_attr->wolfssl_attr.ctx = wolfSSL_CTX_new(wolfSSLv23_method());
if (ssl_attr->wolfssl_attr.ctx == NULL)
{
- log_ssl_errors(LOG_LEVEL_ERROR, "Unable to create TLS context");
+ log_error(LOG_LEVEL_ERROR, "Unable to create TLS context.");
ret = -1;
goto exit;
}
if (wolfSSL_CTX_use_certificate_file(ssl_attr->wolfssl_attr.ctx,
cert_file, SSL_FILETYPE_PEM) != WOLFSSL_SUCCESS)
{
- log_ssl_errors(LOG_LEVEL_ERROR,
- "Loading host certificate %s failed", cert_file);
+ log_error(LOG_LEVEL_ERROR,
+ "Loading host certificate %s failed.", cert_file);
ret = -1;
goto exit;
}
if (wolfSSL_CTX_use_PrivateKey_file(ssl_attr->wolfssl_attr.ctx,
key_file, SSL_FILETYPE_PEM) != WOLFSSL_SUCCESS)
{
- log_ssl_errors(LOG_LEVEL_ERROR,
- "Loading host certificate private key %s failed", key_file);
+ log_error(LOG_LEVEL_ERROR,
+ "Loading host certificate private key %s failed.", key_file);
ret = -1;
goto exit;
}
if (wolfSSL_set_fd(ssl, csp->cfd) != WOLFSSL_SUCCESS)
{
- log_ssl_errors(LOG_LEVEL_ERROR,
- "wolfSSL_set_fd() failed to set the client socket");
+ log_error(LOG_LEVEL_ERROR,
+ "wolfSSL_set_fd() failed to set the client socket.");
ret = -1;
goto exit;
}
{
if (!wolfSSL_set_cipher_list(ssl, csp->config->cipher_list))
{
- log_ssl_errors(LOG_LEVEL_ERROR,
- "Setting the cipher list '%s' for the client connection failed",
+ log_error(LOG_LEVEL_ERROR,
+ "Setting the cipher list '%s' for the client connection failed.",
csp->config->cipher_list);
ret = -1;
goto exit;
ssl_attrs->ctx = wolfSSL_CTX_new(wolfSSLv23_method());
if (ssl_attrs->ctx == NULL)
{
- log_ssl_errors(LOG_LEVEL_ERROR, "TLS context creation failed");
+ log_error(LOG_LEVEL_ERROR, "TLS context creation failed");
ret = -1;
goto exit;
}
else if (wolfSSL_CTX_load_verify_locations(ssl_attrs->ctx,
csp->config->trusted_cas_file, NULL) != WOLFSSL_SUCCESS)
{
- log_ssl_errors(LOG_LEVEL_ERROR, "Loading trusted CAs file %s failed",
+ log_error(LOG_LEVEL_ERROR, "Loading trusted-cas-file '%s' failed.",
csp->config->trusted_cas_file);
ret = -1;
goto exit;
if (wolfSSL_set_fd(ssl, csp->server_connection.sfd) != WOLFSSL_SUCCESS)
{
- log_ssl_errors(LOG_LEVEL_ERROR,
- "wolfSSL_set_fd() failed to set the server socket");
+ log_error(LOG_LEVEL_ERROR,
+ "wolfSSL_set_fd() failed to set the server socket.");
ret = -1;
goto exit;
}
{
if (wolfSSL_set_cipher_list(ssl, csp->config->cipher_list) != WOLFSSL_SUCCESS)
{
- log_ssl_errors(LOG_LEVEL_ERROR,
- "Setting the cipher list '%s' for the server connection failed",
+ log_error(LOG_LEVEL_ERROR,
+ "Setting the cipher list '%s' for the server connection failed.",
csp->config->cipher_list);
ret = -1;
goto exit;
csp->http->host, (unsigned short)strlen(csp->http->host));
if (ret != WOLFSSL_SUCCESS)
{
- log_ssl_errors(LOG_LEVEL_ERROR, "Failed to set use of SNI");
+ log_error(LOG_LEVEL_ERROR, "Failed to set use of SNI.");
ret = -1;
goto exit;
}
#warning wolfssl has been compiled with HAVE_SECURE_RENEGOTIATION while you probably want HAVE_RENEGOTIATION_INDICATION
if(wolfSSL_UseSecureRenegotiation(ssl) != WOLFSSL_SUCCESS)
{
- log_ssl_errors(LOG_LEVEL_ERROR,
+ log_error(LOG_LEVEL_ERROR,
"Failed to enable 'Secure' Renegotiation. Continuing anyway.");
}
#endif