From dd07dd8e1579ed5127943ba4fc370cf192d4580e Mon Sep 17 00:00:00 2001 From: Matthew Mondor Date: Sat, 27 Aug 2016 15:54:08 +0000 Subject: [PATCH] ANSI and 64-bit related cleanup - maybe-unitialized variables Compile with -Werror=maybe-uninitialized and fix breaking cases. --- TODO | 6 ------ src/ssl.c | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/TODO b/TODO index 406ed2d..0924fd6 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,3 @@ -ANSI fixes ----------- - -- Build with -Werror=maybe-uninitialized -- Recheck warnings with -Wall - Future TODO List ---------------- diff --git a/src/ssl.c b/src/ssl.c index 4569bfb..f050148 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -919,7 +919,6 @@ int safe_SSL_accept(aClient *acptr, int fd) { int ssl_err; X509 *ccert; - SSL *ssl; if((ssl_err = SSL_accept(acptr->ssl)) <= 0) { switch(ssl_err = SSL_get_error(acptr->ssl, ssl_err)) { @@ -945,7 +944,8 @@ success: * cipher */ - if ((ccert = SSL_get_peer_certificate(ssl)) != NULL) { +#ifdef SSL_CLIENT_CERTIFICATE + if ((ccert = SSL_get_peer_certificate(acptr->ssl)) != NULL) { /* Client issued a certificate, which we may validate or log */ } else { /* @@ -961,6 +961,7 @@ success: * reinstalling and needing to reissue new CSRs constantly. */ } +#endif return 1; } -- 2.9.0