ssl error handling
authorArt Cancro <ajc@citadel.org>
Sat, 1 Jan 2022 23:23:47 +0000 (18:23 -0500)
committerArt Cancro <ajc@citadel.org>
Sat, 1 Jan 2022 23:23:47 +0000 (18:23 -0500)
webcit-ng/ssl.c

index 8793f8e28ed6df65c51209be8225eb6c712d9824..93c080269c72d30eefab465c1b0b3ed87285c255 100644 (file)
@@ -120,17 +120,7 @@ void starttls(struct client_handle *ch) {
        }
        retval = SSL_accept(ch->ssl_handle);
        if (retval < 1) {
-               long errval;
-               const char *ssl_error_reason = NULL;
-
-               errval = SSL_get_error(ch->ssl_handle, retval);
-               ssl_error_reason = ERR_reason_error_string(ERR_get_error());
-               if (ssl_error_reason == NULL) {
-                       syslog(LOG_WARNING, "SSL_accept failed: errval=%ld, retval=%d %s", errval, retval, strerror(errval));
-               }
-               else {
-                       syslog(LOG_WARNING, "SSL_accept failed: %s", ssl_error_reason);
-               }
+               syslog(LOG_WARNING, "SSL_accept failed: %s", ERR_reason_error_string(ERR_get_error()));
        }
        else {
                syslog(LOG_INFO, "SSL_accept success");