summaryrefslogtreecommitdiff
path: root/support/ab.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2017-07-29 23:05:02 +0000
committerYann Ylavic <ylavic@apache.org>2017-07-29 23:05:02 +0000
commit31a410365282e05a491d7ede075315514db7587d (patch)
tree31b8be774ef0fe711192287c0f6a2dc9299f0943 /support/ab.c
parent36d01334ab8cb2127ff59ecac7cbfb17b3babf74 (diff)
downloadhttpd-31a410365282e05a491d7ede075315514db7587d.tar.gz
mod_ssl, ab: compatibility with LibreSSL. PR 61184.
LibreSSL defines OPENSSL_VERSION_NUMBER = 2.0, but is not compatible with all of the latest OpenSSL 1.1 API. Address this by defining MODSSL_USE_OPENSSL_PRE_1_1_API which is true for anything but OpenSSL >= 1.1 (for now). Proposed by: Bernard Spil <brnrd freebsd.org> Reviewed by: ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1803396 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/ab.c')
-rw-r--r--support/ab.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/support/ab.c b/support/ab.c
index 58769a9c89..118e17b5c8 100644
--- a/support/ab.c
+++ b/support/ab.c
@@ -197,6 +197,14 @@ typedef STACK_OF(X509) X509_STACK_TYPE;
#if !defined(OPENSSL_NO_TLSEXT) && defined(SSL_set_tlsext_host_name)
#define HAVE_TLSEXT
#endif
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2060000f
+#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
+#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
+#define SSL_CTX_set_min_proto_version(ctx, version) \
+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
+#define SSL_CTX_set_max_proto_version(ctx, version) \
+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
+#endif
#endif
#include <math.h>