* SConstruct: Check for X509_STORE wrapper functions and provide
    SERF_NO_SSL_X509_STORE_WRAPPERS.

* buckets/ssl_buckets.c: Provide custom X509_STORE_get0_param() macro
   if SERF_NO_SSL_X509_STORE_WRAPPERS is defined, instead of basing
   this decision off of OPENSSL_VERSION_NUMBER.


git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1775248 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/SConstruct b/SConstruct
index 9412cdd..58cab47 100644
--- a/SConstruct
+++ b/SConstruct
@@ -420,6 +420,8 @@
 conf = Configure(env)
 if not conf.CheckFunc('BIO_set_init'):
   env.Append(CPPDEFINES=['SERF_NO_SSL_BIO_WRAPPERS'])
+if not conf.CheckFunc('X509_STORE_get0_param'):
+  env.Append(CPPDEFINES=['SERF_NO_SSL_X509_STORE_WRAPPERS'])
 if conf.CheckFunc('OPENSSL_malloc_init'):
   env.Append(CPPDEFINES=['SERF_HAVE_OPENSSL_MALLOC_INIT'])
 env = conf.Finish()
diff --git a/buckets/ssl_buckets.c b/buckets/ssl_buckets.c
index 06059ae..3c8e809 100644
--- a/buckets/ssl_buckets.c
+++ b/buckets/ssl_buckets.c
@@ -51,6 +51,9 @@
 
 #if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
 #define USE_LEGACY_OPENSSL
+#endif
+
+#ifdef SERF_NO_SSL_X509_STORE_WRAPPERS
 #define X509_STORE_get0_param(store) store->param
 #endif