diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-04-03 17:03:02 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-04-03 17:03:02 +0200 |
commit | 97f214d0c9059cd85f634155f6f3c49648953558 (patch) | |
tree | a4f4d8bae33895ddd158008c454f83630967fe27 /lib | |
parent | c57166b575c706fbbf697e1536c9ef363f35ef40 (diff) |
http2+openssl: fix compiler warnings in ALPN using code
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vtls/openssl.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 35912c74c..b59233a25 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1892,11 +1892,6 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) struct SessionHandle *data = conn->data; int err; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; -#ifdef HAS_ALPN - char* neg_protocol; - int len = 0; -#endif - DEBUGASSERT(ssl_connect_2 == connssl->connecting_state || ssl_connect_2_reading == connssl->connecting_state || ssl_connect_2_writing == connssl->connecting_state); @@ -1998,6 +1993,8 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) * negotiated */ if(data->set.ssl_enable_alpn) { + const unsigned char* neg_protocol; + unsigned int len; SSL_get0_alpn_selected(connssl->handle, &neg_protocol, &len); if(len != 0) { infof(data, "ALPN, server accepted to use %.*s\n", len, neg_protocol); |