From: Rainer Jung Date: Wed, 10 Aug 2016 19:59:00 +0000 (+0000) Subject: Fix compiler warning when using OpenSSL 1.1.0. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e25f119fba49afd908e7a97f81088d93587e9899;p=thirdparty%2Fapache%2Fhttpd.git Fix compiler warning when using OpenSSL 1.1.0. The old compatibility macro check no longer works, because those are now actual functions, so an ifndef is not the correct check. Backport of r1729435 from trunk. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x-openssl-1.1.0-compat@1755822 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_private.h b/modules/ssl/ssl_private.h index 7f6f9fd95ac..d51d304807c 100644 --- a/modules/ssl/ssl_private.h +++ b/modules/ssl/ssl_private.h @@ -151,6 +151,7 @@ /* OCSP stapling */ #if !defined(OPENSSL_NO_OCSP) && defined(SSL_CTX_set_tlsext_status_cb) #define HAVE_OCSP_STAPLING +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* backward compatibility with OpenSSL < 1.0 */ #ifndef sk_OPENSSL_STRING_num #define sk_OPENSSL_STRING_num sk_num @@ -161,7 +162,8 @@ #ifndef sk_OPENSSL_STRING_pop #define sk_OPENSSL_STRING_pop sk_pop #endif -#endif +#endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L */ +#endif /* if !defined(OPENSSL_NO_OCSP) && defined(SSL_CTX_set_tlsext_status_cb) */ /* TLS session tickets */ #if defined(SSL_CTX_set_tlsext_ticket_key_cb) diff --git a/modules/ssl/ssl_util_stapling.c b/modules/ssl/ssl_util_stapling.c index 1226d9bfde4..57a753c16f6 100644 --- a/modules/ssl/ssl_util_stapling.c +++ b/modules/ssl/ssl_util_stapling.c @@ -172,10 +172,6 @@ int ssl_stapling_init_cert(server_rec *s, apr_pool_t *p, apr_pool_t *ptemp, apr_pool_cleanup_null); if (aia) { /* allocate uri from the pconf pool */ - /* XXX: OpenSSL 1.1.0: Compiler warning: passing argument 1 of 'sk_value' - * from incompatible pointer type expected 'const struct _STACK *' - * but argument is of type 'struct stack_st_OPENSSL_STRING *' - */ cinf->uri = apr_pstrdup(p, sk_OPENSSL_STRING_value(aia, 0)); X509_email_free(aia); }