diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-11-13 19:25:58 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-11-13 19:25:58 +0100 |
commit | 60f478cb1c0c4ede89987d876fba8b37d0b0914c (patch) | |
tree | 355bdf2b922ae6995d80f6e38f3871abba665a69 /event-openssl.patch | |
parent | b45187edeaa98332266620b7be9c55c41c5627c6 (diff) |
php-pecl-event: 0.11.0
Diffstat (limited to 'event-openssl.patch')
-rw-r--r-- | event-openssl.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/event-openssl.patch b/event-openssl.patch new file mode 100644 index 0000000..a778155 --- /dev/null +++ b/event-openssl.patch @@ -0,0 +1,86 @@ +From e76022e2f4abe48774b667ef4fc1ed83fa6afa51 Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Thu, 13 Nov 2014 18:59:10 +0100 +Subject: [PATCH] fix build with old openssl (RHEL-5) + +--- + classes/ssl_context.c | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/classes/ssl_context.c b/classes/ssl_context.c +index 6f71a08..345e68f 100644 +--- a/classes/ssl_context.c ++++ b/classes/ssl_context.c +@@ -240,6 +240,7 @@ static inline void set_ssl_ctx_options(SSL_CTX *ctx, HashTable *ht TSRMLS_DC) + SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1); + } + break; ++#ifdef SSL_OP_NO_TLSv1_1 + case PHP_EVENT_OPT_NO_TLSv1_1: + if (zval_is_true(*ppzval)) { + SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_1); +@@ -247,6 +248,8 @@ static inline void set_ssl_ctx_options(SSL_CTX *ctx, HashTable *ht TSRMLS_DC) + SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1_1); + } + break; ++#endif ++#ifdef SSL_OP_NO_TLSv1_2 + case PHP_EVENT_OPT_NO_TLSv1_2: + if (zval_is_true(*ppzval)) { + SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_2); +@@ -254,6 +257,7 @@ static inline void set_ssl_ctx_options(SSL_CTX *ctx, HashTable *ht TSRMLS_DC) + SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1_2); + } + break; ++#endif + case PHP_EVENT_OPT_CIPHER_SERVER_PREFERENCE: + if (zval_is_true(*ppzval)) { + SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE); +@@ -342,16 +346,44 @@ static zend_always_inline SSL_METHOD *get_ssl_method(long in_method TSRMLS_DC) + method = (SSL_METHOD *) TLSv1_server_method(); + break; + case PHP_EVENT_TLSv11_CLIENT_METHOD: ++#ifdef SSL_OP_NO_TLSv1_1 + method = (SSL_METHOD *) TLSv1_1_client_method(); ++#else ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, ++ "TLSv1_1 support is not compiled into the " ++ "OpenSSL library PHP is linked against"); ++ return NULL; ++#endif + break; + case PHP_EVENT_TLSv11_SERVER_METHOD: ++#ifdef SSL_OP_NO_TLSv1_1 + method = (SSL_METHOD *) TLSv1_1_server_method(); ++#else ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, ++ "TLSv1_1 support is not compiled into the " ++ "OpenSSL library PHP is linked against"); ++ return NULL; ++#endif + break; + case PHP_EVENT_TLSv12_CLIENT_METHOD: ++#ifdef SSL_OP_NO_TLSv1_2 + method = (SSL_METHOD *) TLSv1_2_client_method(); ++#else ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, ++ "TLSv1_2 support is not compiled into the " ++ "OpenSSL library PHP is linked against"); ++ return NULL; ++#endif + break; + case PHP_EVENT_TLSv12_SERVER_METHOD: ++#ifdef SSL_OP_NO_TLSv1_2 + method = (SSL_METHOD *) TLSv1_2_server_method(); ++#else ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, ++ "TLSv1_2 support is not compiled into the " ++ "OpenSSL library PHP is linked against"); ++ return NULL; ++#endif + break; + default: + return NULL; +-- +2.1.1 + |