From 6f2c087d425d7855418c21f5a946cc0e0deb8e56 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Jan 22 2020 14:32:49 +0000 Subject: Make nss_engine_status() conditional on SSL_ENGINE_SET This allows older versions of Apache (httpd-2.4.6-90.el7) to build newer releases of mod_nss. nss_engine_status() is only called by nss_engine_set(). Patch contributed by M. Lampe. https://pagure.io/mod_nss/issue/49 --- diff --git a/mod_nss.c b/mod_nss.c index c6b457b..6a15501 100644 --- a/mod_nss.c +++ b/mod_nss.c @@ -220,6 +220,11 @@ static SSLConnRec *nss_init_connection_ctx(conn_rec *c) return sslconn; } +static APR_OPTIONAL_FN_TYPE(ssl_proxy_enable) *othermod_proxy_enable; +static APR_OPTIONAL_FN_TYPE(ssl_engine_disable) *othermod_engine_disable; +#ifdef SSL_ENGINE_SET +static APR_OPTIONAL_FN_TYPE(ssl_engine_set) *othermod_engine_set; + static int nss_engine_status(conn_rec *c, SSLConnRec *sslconn) { SSLSrvConfigRec *sc = mySrvConfig(c->base_server); @@ -250,11 +255,6 @@ static int nss_engine_status(conn_rec *c, SSLConnRec *sslconn) return OK; } -static APR_OPTIONAL_FN_TYPE(ssl_proxy_enable) *othermod_proxy_enable; -static APR_OPTIONAL_FN_TYPE(ssl_engine_disable) *othermod_engine_disable; -#ifdef SSL_ENGINE_SET -static APR_OPTIONAL_FN_TYPE(ssl_engine_set) *othermod_engine_set; - int nss_engine_set(conn_rec *c, ap_conf_vector_t *per_dir_config, int proxy, int enable)