summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2017-11-03 18:53:54 +0100
committerNiklas Hambüchen <mail@nh2.me>2018-03-21 18:44:53 +0100
commitba87963b7622e31cacb4348af817c777d1c443ab (patch)
tree9a08d1dadd2f8351609dea323787b33f9a6540d4
parentb5f307fa5e7241dd000f0eeac27cc4638a5bccf8 (diff)
socket: Improve error logging when loading SSL files fails
* Say which file had the problem * Dump openssl error stack Fixes gluster/glusterfs#431. Change-Id: I66e9a0ae7758e9d7d8a5f19cc8ff898f01f2b491 Signed-off-by: Niklas Hambüchen <mail@nh2.me>
-rw-r--r--rpc/rpc-transport/socket/src/socket.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index a3917040069..256454a9515 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -4614,7 +4614,9 @@ socket_init (rpc_transport_t *this)
if (!SSL_CTX_use_certificate_chain_file(priv->ssl_ctx,
priv->ssl_own_cert)) {
gf_log(this->name, GF_LOG_ERROR,
- "could not load our cert");
+ "could not load our cert at %s",
+ priv->ssl_own_cert);
+ ssl_dump_error_stack(this->name);
goto err;
}
@@ -4622,7 +4624,9 @@ socket_init (rpc_transport_t *this)
priv->ssl_private_key,
SSL_FILETYPE_PEM)) {
gf_log(this->name, GF_LOG_ERROR,
- "could not load private key");
+ "could not load private key at %s",
+ priv->ssl_private_key);
+ ssl_dump_error_stack(this->name);
goto err;
}