summaryrefslogtreecommitdiff
path: root/sockets.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-19 15:22:28 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-19 15:22:28 +0100
commitfa964744e02997d81083f1bab5194086754c2b6f (patch)
treedc3ba217bac2faeea466c278b207f3d93ad53fe3 /sockets.c
parent3b85b88516fbc4c793a456674265b6a64d92eee2 (diff)
Add some help output if certificate or key files are missing.
Diffstat (limited to 'sockets.c')
-rw-r--r--sockets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sockets.c b/sockets.c
index 943b15c..562e5c0 100644
--- a/sockets.c
+++ b/sockets.c
@@ -170,11 +170,13 @@ void configure_openssl_context(SSL_CTX *ctx, char *certfile, char *keyfile) {
if (SSL_CTX_use_certificate_file(ctx, certfile, SSL_FILETYPE_PEM) <= 0) {
ERR_print_errors_fp(stderr);
+ printf("Couldn't load certificate file '%s'. Hint: You can generate your own with OpenSSL. Once created, set its location in blabouncer.conf which by default is in ~/.blabouncer/.\n", certfile);
exit(EXIT_FAILURE);
}
if (SSL_CTX_use_PrivateKey_file(ctx, keyfile, SSL_FILETYPE_PEM) <= 0 ) {
ERR_print_errors_fp(stderr);
+ printf("Couldn't load key file '%s'. Hint: You can generate your own with OpenSSL. Once created, set its location in blabouncer.conf which by default is in ~/.blabouncer/.\n", keyfile);
exit(EXIT_FAILURE);
}
}