]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix compiler warning for OpenSSL without HAVE_OCSP
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 20 Nov 2013 20:52:11 +0000 (22:52 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 20 Nov 2013 21:12:33 +0000 (23:12 +0200)
Commit 080585c01a1e0ffc42577dd10d475f3ab01d0280 added ssl_ctx outside
ifdef HAVE_OCSP block that was the only user for this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/crypto/tls_openssl.c

index e992ac12e9508d00414c4d1ff81826a3ca5d14d6..3c5863465c83e77412d77795f2401a041129d14e 100644 (file)
@@ -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);