diff options
Diffstat (limited to 'blabouncer.c')
-rw-r--r-- | blabouncer.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/blabouncer.c b/blabouncer.c index baf27c6..ff8667a 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -93,9 +93,12 @@ int connecttoircserver(SSL_CTX **serverctx, SSL **server_ssl, int *serversockfd, *server_ssl = SSL_new(*serverctx); SSL_set_fd(*server_ssl, *serversockfd); if (SSL_connect(*server_ssl) == -1) { - ERR_print_errors_fp(stderr); + char* errstr = openssl_error_string(); + debugprint(DEBUG_CRIT, "SSL_connect failed - %s", errstr); + if (errstr != NULL) free(errstr); } else { debugprint(DEBUG_FULL, "SSL_connect() success.\n"); + } debugprint(DEBUG_FULL, "server openssl complete.\n"); } else { @@ -704,8 +707,9 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) { clients[j].ssl = SSL_new(ctx); SSL_set_fd(clients[j].ssl, newfd); if (SSL_accept(clients[j].ssl) <= 0) { - debugprint(DEBUG_CRIT, "SSL_accept failed for fd %d.\n", clients[j].fd); - ERR_print_errors_fp(stderr); + char* errstr = openssl_error_string(); + debugprint(DEBUG_CRIT, "SSL_accept failed for fd %d - %s", clients[j].fd, errstr); + if (errstr != NULL) free(errstr); } else { debugprint(DEBUG_FULL, "SSL_accept succeeded for fd %d.\n", clients[j].fd); } |