]> granicus.if.org Git - apache/commitdiff
Use correct type, need OPENSSL_STRING for >= 1.0 which doesn't exist on 0.9.8
authorStephen Henson <drh@apache.org>
Tue, 30 Nov 2010 00:50:36 +0000 (00:50 +0000)
committerStephen Henson <drh@apache.org>
Tue, 30 Nov 2010 00:50:36 +0000 (00:50 +0000)
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

modules/ssl/ssl_toolkit_compat.h
modules/ssl/ssl_util_stapling.c

index b041ee82528cdfca96ba3f2a009ba74f34f5fa91..a31258a609f232fb31838f7ecc86924a5a53c6da 100644 (file)
@@ -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)
index 8819def4ba6bb2ad3c492382c0aba05457c1f829..afcf4efa2cc96b47c5d0692e5699cda2e4d2995b 100644 (file)
@@ -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");