From: Jouni Malinen Date: Wed, 20 Nov 2013 20:52:11 +0000 (+0200) Subject: Fix compiler warning for OpenSSL without HAVE_OCSP X-Git-Tag: hostap_2_1~508 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81cbc046fef875abfe8e1bdcd0860c3c9e093899;p=thirdparty%2Fhostap.git Fix compiler warning for OpenSSL without HAVE_OCSP Commit 080585c01a1e0ffc42577dd10d475f3ab01d0280 added ssl_ctx outside ifdef HAVE_OCSP block that was the only user for this. Signed-hostap: Jouni Malinen --- diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index e992ac12e..3c5863465 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -3060,7 +3060,6 @@ int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn, { int ret; unsigned long err; - SSL_CTX *ssl_ctx = tls_ctx; if (conn == NULL) return -1; @@ -3133,6 +3132,7 @@ int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn, #ifdef HAVE_OCSP if (params->flags & TLS_CONN_REQUEST_OCSP) { + SSL_CTX *ssl_ctx = tls_ctx; SSL_set_tlsext_status_type(conn->ssl, TLSEXT_STATUSTYPE_ocsp); SSL_CTX_set_tlsext_status_cb(ssl_ctx, ocsp_resp_cb); SSL_CTX_set_tlsext_status_arg(ssl_ctx, conn);