]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Return 0 when ssl authentication is not available
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 28 Feb 2020 07:11:11 +0000 (08:11 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 28 Feb 2020 07:11:11 +0000 (08:11 +0100)
util/net_help.c

index cc1ca7ec5876efd97d44d9c3486363eb760bfd9a..2a392781db8c5266e2fc8cd8fc9b1a564eb62b6b 100644 (file)
@@ -1220,14 +1220,14 @@ void* outgoing_ssl_fd(void* sslctx, int fd)
 int check_auth_name_for_ssl(char* auth_name)
 {
        if(!auth_name) return 1;
-#ifdef HAVE_SSL
-#if !defined(HAVE_SSL_SET1_HOST) && !defined(HAVE_X509_VERIFY_PARAM_SET1_HOST)
+#if defined(HAVE_SSL) && !defined(HAVE_SSL_SET1_HOST) && !defined(HAVE_X509_VERIFY_PARAM_SET1_HOST)
        log_err("the query has an auth_name %s, but libssl has no call to "
                "perform TLS authentication.  Remove that name from config "
                "or upgrade the ssl crypto library.", auth_name);
-#endif
-#endif
+       return 0;
+#else
        return 1;
+#endif
 }
 
 /** set the authname on an SSL structure, SSL* ssl */