From: Stephen Henson Date: Tue, 30 Nov 2010 00:50:36 +0000 (+0000) Subject: Use correct type, need OPENSSL_STRING for >= 1.0 which doesn't exist on 0.9.8 X-Git-Tag: 2.3.10~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c4294b796d9c9cd346ab5c1caff7007f63a50b3;p=apache Use correct type, need OPENSSL_STRING for >= 1.0 which doesn't exist on 0.9.8 so #define sk_OPENSSL_STRING_pop to sk_pop on 0.9.8 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1040366 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_toolkit_compat.h b/modules/ssl/ssl_toolkit_compat.h index b041ee8252..a31258a609 100644 --- a/modules/ssl/ssl_toolkit_compat.h +++ b/modules/ssl/ssl_toolkit_compat.h @@ -165,6 +165,9 @@ typedef int (modssl_read_bio_cb_fn)(char*,int,int,void*); #if OPENSSL_VERSION_NUMBER >= 0x00908080 && defined(HAVE_OCSP) \ && !defined(OPENSSL_NO_TLSEXT) #define HAVE_OCSP_STAPLING +#if (OPENSSL_VERSION_NUMBER < 0x10000000) +#define sk_OPENSSL_STRING_pop sk_pop +#endif #endif #if (OPENSSL_VERSION_NUMBER >= 0x009080a0) && defined(OPENSSL_FIPS) diff --git a/modules/ssl/ssl_util_stapling.c b/modules/ssl/ssl_util_stapling.c index 8819def4ba..afcf4efa2c 100644 --- a/modules/ssl/ssl_util_stapling.c +++ b/modules/ssl/ssl_util_stapling.c @@ -103,7 +103,7 @@ int ssl_stapling_init_cert(server_rec *s, modssl_ctx_t *mctx, X509 *x) { certinfo *cinf; X509 *issuer = NULL; - STACK_OF(STRING) *aia = NULL; + STACK_OF(OPENSSL_STRING) *aia = NULL; if (x == NULL) return 0; @@ -139,7 +139,7 @@ int ssl_stapling_init_cert(server_rec *s, modssl_ctx_t *mctx, X509 *x) aia = X509_get1_ocsp(x); if (aia) - cinf->uri = sk_STRING_pop(aia); + cinf->uri = sk_OPENSSL_STRING_pop(aia); if (!cinf->uri && !mctx->stapling_force_url) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "ssl_stapling_init_cert: no responder URL");