com php-src: Fix build against older OpenSSL libs: ext/openssl/ xp_ssl.c

From: Date: Fri, 21 Feb 2014 20:01:04 +0000
Subject: com php-src: Fix build against older OpenSSL libs: ext/openssl/ xp_ssl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76179@lists.php.net to get a copy of this message
Commit: a27db7d2daa9ded873f7589272a2d12d7f586f9d Author: Daniel Lowrey <rdlowrey@php.net> Fri, 21 Feb 2014 12:16:23 -0700 Parents: 1268bd6045ea0fce57c5c10a1faca98a70dd692b Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a27db7d2daa9ded873f7589272a2d12d7f586f9d Log: Fix build against older OpenSSL libs Changed paths: M ext/openssl/xp_ssl.c Diff: diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 1e2ff84..4ee3ff6 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -536,7 +536,11 @@ static inline int php_openssl_setup_crypto(php_stream *stream, } } +#if OPENSSL_VERSION_NUMBER >= 0x10001001L sslsock->ctx = SSL_CTX_new(method); +#else + sslsock->ctx = SSL_CTX_new((SSL_METHOD*)method); +#endif if (sslsock->ctx == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to create an SSL context"); return -1; @@ -638,8 +642,10 @@ static zval *php_capture_ssl_session_meta(SSL *ssl_handle) const SSL_CIPHER *cipher = SSL_get_current_cipher(ssl_handle); switch (proto) { +#if OPENSSL_VERSION_NUMBER >= 0x10001001L case TLS1_2_VERSION: proto_str = "TLSv1.2"; break; case TLS1_1_VERSION: proto_str = "TLSv1.1"; break; +#endif case TLS1_VERSION: proto_str = "TLSv1"; break; case SSL3_VERSION: proto_str = "SSLv3"; break; case SSL2_VERSION: proto_str = "SSLv2"; break;

« previous php.cvs (#76179) next »