From fa964744e02997d81083f1bab5194086754c2b6f Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 19 May 2019 15:22:28 +0100 Subject: Add some help output if certificate or key files are missing. --- blabouncer.c | 1 - sockets.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/blabouncer.c b/blabouncer.c index 846695b..022301f 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -6,7 +6,6 @@ // - Comma separated channel list in JOINs/PARTs // - Perhaps rename clients.ssl and server_ssl since they may not even be OpenSSL sockets // - Is it possible to replay JOINs/PARTs accurately? -// - Add help output for missing certs // - Remove any old channel name/mode/prefix code that isn't needed any more // "server" means the real IRC server 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); } } -- cgit v1.2.3