Use correct variable in test diagnostic
authorBenjamin Kaduk <bkaduk@akamai.com>
Mon, 13 Feb 2017 20:14:06 +0000 (14:14 -0600)
committerRichard Levitte <levitte@openssl.org>
Thu, 23 Feb 2017 18:40:26 +0000 (19:40 +0100)
create_ssl_connection() prints out the results if SSL_accept() and/or
SSL_connect() fail, but was reusing the client return value when printing
about SSL_accept() failures.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2279)

test/ssltestlib.c

index 1981cb5696714f80cea3495f200e6246614a5997..8a4dd49d5c7eff624ef76029c1b56fab0fdd9260 100644 (file)
@@ -669,7 +669,7 @@ int create_ssl_connection(SSL *serverssl, SSL *clientssl)
         }
 
         if (!servererr && rets <= 0 && err != SSL_ERROR_WANT_READ) {
-            printf("SSL_accept() failed %d, %d\n", retc, err);
+            printf("SSL_accept() failed %d, %d\n", rets, err);
             servererr = 1;
         }
         if (clienterr && servererr)