]> diplodocus.org Git - nmh/blobdiff - sbr/netsec.c
Escape literal leading full stop in man/new.man.
[nmh] / sbr / netsec.c
index 79fd6a0ddcb2fe7c53823027771bf5bc1d3b87c4..f077c668d39b1a3409b85711eedec2e131f0e400 100644 (file)
@@ -1011,7 +1011,6 @@ netsec_set_sasl_params(netsec_context *nsc, const char *service,
     nsc->sasl_creds = nmh_get_credentials(nsc->ns_hostname, nsc->ns_userid);
 
 #else /* CYRUS_SASL */
-    NMH_UNUSED(hostname);
     NMH_UNUSED(service);
     NMH_UNUSED(errstr);
 #endif /* CYRUS_SASL */
@@ -1543,7 +1542,9 @@ netsec_set_tls(netsec_context *nsc, int tls, int noverify, char **errstr)
         */
 
        if (! noverify) {
+#ifdef HAVE_X509_VERIFY_PARAM_SET1_HOST
            X509_VERIFY_PARAM *param;
+#endif /* HAVE_X509_VERIFY_PARAM_SET1_HOST */
 
            SSL_set_verify(ssl, SSL_VERIFY_PEER, NULL);
            if (! nsc->ns_hostname) {
@@ -1553,6 +1554,7 @@ netsec_set_tls(netsec_context *nsc, int tls, int noverify, char **errstr)
                return NOTOK;
            }
 
+#ifdef HAVE_X509_VERIFY_PARAM_SET1_HOST
            param = SSL_get0_param(ssl);
 
            if (! X509_VERIFY_PARAM_set1_host(param, nsc->ns_hostname, 0)) {
@@ -1562,6 +1564,7 @@ netsec_set_tls(netsec_context *nsc, int tls, int noverify, char **errstr)
                SSL_free(ssl);
                return NOTOK;
            }
+#endif /* HAVE_X509_VERIFY_PARAM_SET1_HOST */
        }
 
        ssl_bio = BIO_new(BIO_f_ssl());
@@ -1583,6 +1586,7 @@ netsec_set_tls(netsec_context *nsc, int tls, int noverify, char **errstr)
 
 #else /* TLS_SUPPORT */
     NMH_UNUSED(nsc);
+    NMH_UNUSED(noverify);
 
     if (tls) {
        netsec_err(errstr, "TLS is not supported");