summaryrefslogtreecommitdiff
path: root/ext/openssl/xp_ssl.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2016-10-23 19:55:22 +0100
committerJakub Zelenka <bukka@php.net>2016-10-23 19:55:22 +0100
commit820bca8ca3e6520d13171cca141e02d5f2b9d27e (patch)
treecc75df404fe720e6a9116a1181a1ec12a5497215 /ext/openssl/xp_ssl.c
parent930ae4034e9e6f66180c3a017e323d934f09e367 (diff)
downloadphp-git-820bca8ca3e6520d13171cca141e02d5f2b9d27e.tar.gz
Try to fix LibreSSL build
Diffstat (limited to 'ext/openssl/xp_ssl.c')
-rw-r--r--ext/openssl/xp_ssl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index a7a622f6d5..9a53a6edb9 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -91,7 +91,7 @@
/* Used for peer verification in windows */
#define PHP_X509_NAME_ENTRY_TO_UTF8(ne, i, out) ASN1_STRING_to_UTF8(&out, X509_NAME_ENTRY_get_data(X509_NAME_get_entry(ne, i)))
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength);
#endif
@@ -1123,7 +1123,7 @@ static void init_server_reneg_limit(php_stream *stream, php_openssl_netstream_da
}
/* }}} */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength)
{
BIGNUM *bn = NULL;
@@ -1192,7 +1192,7 @@ static int set_server_dh_param(php_stream * stream, SSL_CTX *ctx) /* {{{ */
}
/* }}} */
-#if defined(HAVE_ECDH) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(HAVE_ECDH) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER))
static int set_server_ecdh_curve(php_stream *stream, SSL_CTX *ctx) /* {{{ */
{
zval *zvcurve;
@@ -1235,13 +1235,13 @@ static int set_server_specific_opts(php_stream *stream, SSL_CTX *ctx) /* {{{ */
zval *zv;
long ssl_ctx_options = SSL_CTX_get_options(ctx);
-#if defined(HAVE_ECDH) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(HAVE_ECDH) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER))
if (set_server_ecdh_curve(stream, ctx) == FAILURE) {
return FAILURE;
}
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
SSL_CTX_set_tmp_rsa_callback(ctx, tmp_rsa_cb);
#endif
/* We now use tmp_rsa_cb to generate a key of appropriate size whenever necessary */