]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HTTP (curl): Use SSL_get_SSL_CTX() helper
authorBen Greear <greearb@candelatech.com>
Tue, 12 Sep 2017 17:43:36 +0000 (10:43 -0700)
committerJouni Malinen <j@w1.fi>
Tue, 1 Jan 2019 18:07:19 +0000 (20:07 +0200)
The direct ssl->ctx access are not allowed anymore in newer OpenSSL
versions, so use the SSL_get_SSL_CTX() helper for this.

Signed-off-by: Ben Greear <greearb@candelatech.com>
src/utils/http_curl.c

index 58519ea8d2489362d756ba03c9edf1cbbb9685b3..3fd8e424a72761ada7280d158d26ec33f3032377 100644 (file)
@@ -1136,7 +1136,7 @@ static int ocsp_resp_cb(SSL *s, void *arg)
                return 0;
        }
 
-       store = SSL_CTX_get_cert_store(s->ctx);
+       store = SSL_CTX_get_cert_store(SSL_get_SSL_CTX(s));
        if (ctx->peer_issuer) {
                wpa_printf(MSG_DEBUG, "OpenSSL: Add issuer");
                debug_dump_cert("OpenSSL: Issuer certificate",
@@ -1277,7 +1277,7 @@ static const SSL_METHOD *real_ssl_method;
 
 static int curl_patch_ssl_new(SSL *s)
 {
-       SSL_CTX *ssl = s->ctx;
+       SSL_CTX *ssl = SSL_get_SSL_CTX(s);
        int ret;
 
        ssl->method = real_ssl_method;