From: Yann Ylavic Date: Fri, 1 Jul 2016 15:08:10 +0000 (+0000) Subject: ab: follow up to r1750854: still better naming, and a C89 fix. X-Git-Tag: 2.5.0-alpha~1434 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d89808eba779afa4c85a86c00497e8e39a182d4;p=apache ab: follow up to r1750854: still better naming, and a C89 fix. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750960 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index bc2a780e22..5fcc1da333 100644 --- a/support/ab.c +++ b/support/ab.c @@ -349,7 +349,7 @@ char *ssl_tmp_key = NULL; BIO *bio_out,*bio_err; #ifdef HAVE_TLSEXT int tls_use_sni = 1; /* used by default, -I disables it */ -const char *tls_host = NULL; /* 'opt_host' if any, 'hostname' otherwise */ +const char *tls_sni = NULL; /* 'opt_host' if any, 'hostname' otherwise */ #endif #endif @@ -913,8 +913,8 @@ static void output_results(int sig) printf("Server Temp Key: %s\n", ssl_tmp_key); } #ifdef HAVE_TLSEXT - if (is_ssl && tls_host) { - printf("TLS Server Name: %s\n", tls_host); + if (is_ssl && tls_sni) { + printf("TLS Server Name: %s\n", tls_sni); } #endif #endif @@ -1386,8 +1386,8 @@ static void start_connect(struct connection * c) BIO_set_callback_arg(bio, (void *)bio_err); } #ifdef HAVE_TLSEXT - if (tls_host) { - SSL_set_tlsext_host_name(c->ssl, tls_host); + if (tls_sni) { + SSL_set_tlsext_host_name(c->ssl, tls_sni); } #endif } else { @@ -1798,13 +1798,13 @@ static void test(void) } #ifdef HAVE_TLSEXT - apr_ipsubnet_t *ip; if (is_ssl && tls_use_sni) { - if (((tls_host = opt_host) || (tls_host = hostname)) && - (!*tls_host || apr_ipsubnet_create(&ip, tls_host, NULL, + apr_ipsubnet_t *ip; + if (((tls_sni = opt_host) || (tls_sni = hostname)) && + (!*tls_sni || apr_ipsubnet_create(&ip, tls_sni, NULL, cntxt) == APR_SUCCESS)) { /* IP not allowed in TLS SNI extension */ - tls_host = NULL; + tls_sni = NULL; } } #endif