]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fixup openssl 1.0.2 compile
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 10 Dec 2018 14:36:43 +0000 (14:36 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 10 Dec 2018 14:36:43 +0000 (14:36 +0000)
git-svn-id: file:///svn/unbound/trunk@5019 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/outside_network.c

index f20bdffc87e562ba39ae141e2825579db2902d52..8fefb01302b039b88f644f84bf833c3a3f9e3ef8 100644 (file)
@@ -5,6 +5,7 @@
        - Fix for FreeBSD port make with dnscrypt and dnstap enabled.
        - Fix #4206: support openssl 1.0.2 for TLS hostname verification,
          alongside the 1.1.0 and later support that is already there.
+       - Fixup openssl 1.0.2 compile
 
 6 December 2018: Wouter
        - Fix dns64 allocation in wrong region for returned internal queries.
index 18385825b72eb75df9cf6eb098a5d2526c0913c7..1badb5116637332a3b23a70a9d9f30a41aec6265 100644 (file)
@@ -63,6 +63,9 @@
 #ifdef HAVE_OPENSSL_SSL_H
 #include <openssl/ssl.h>
 #endif
+#ifdef HAVE_X509_VERIFY_PARAM_SET1_HOST
+#include <openssl/x509v3.h>
+#endif
 
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
@@ -399,7 +402,7 @@ outnet_tcp_take_into_use(struct waiting_tcp* w, uint8_t* pkt, size_t pkt_len)
                                comm_point_close(pend->c);
                                return 0;
                        }
-                       SSL_set_verify(ssl, SSL_VERIFY_PEER, NULL);
+                       SSL_set_verify(pend->c->ssl, SSL_VERIFY_PEER, NULL);
                }
 #endif /* HAVE_SSL_SET1_HOST */
        }
@@ -2423,7 +2426,7 @@ outnet_comm_point_for_http(struct outside_network* outnet,
                /* openssl 1.0.2 has this function that can be used for
                 * set1_host like verification */
                if((SSL_CTX_get_verify_mode(outnet->sslctx)&SSL_VERIFY_PEER)) {
-                       X509_VERIFY_PARAM* param = SSL_get0_param(pend->c->ssl);
+                       X509_VERIFY_PARAM* param = SSL_get0_param(cp->ssl);
                        X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
                        if(!X509_VERIFY_PARAM_set1_host(param, host, strlen(host))) {
                                log_err("X509_VERIFY_PARAM_set1_host failed");