From d14670ccdb2782abaaaa721d1c379138fa64aae6 Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Wed, 18 Dec 2013 07:25:05 +0100 Subject: Eliminate another TSRMLS_FETCH() in i_zend_is_true() # Affected extensions have all been updated, ext/opcache and ext/zip # both have macros for cross version compatibility --- ext/openssl/xp_ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/openssl/xp_ssl.c') diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 9c9f2a3592..919b008963 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -926,7 +926,7 @@ static char * get_sni(php_stream_context *ctx, const char *resourcename, size_t if (ctx) { zval **val = NULL; - if (php_stream_context_get_option(ctx, "ssl", "SNI_enabled", &val) == SUCCESS && !zend_is_true(*val)) { + if (php_stream_context_get_option(ctx, "ssl", "SNI_enabled", &val) == SUCCESS && !zend_is_true(*val TSRMLS_CC)) { return NULL; } if (php_stream_context_get_option(ctx, "ssl", "SNI_server_name", &val) == SUCCESS) { -- cgit v1.2.1 From c91ad8233b46e1605b225c782efc3131f158d9be Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 29 Jan 2014 22:50:56 +0100 Subject: fix merge error after b4b4d9697fa43a526466165a3ca89d058296cb04 --- ext/openssl/xp_ssl.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'ext/openssl/xp_ssl.c') diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 61ba0271cb..cc8ea8a033 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -923,18 +923,6 @@ static int get_crypto_method(php_stream_context *ctx) { static char * get_url_name(const char *resourcename, size_t resourcenamelen, int is_persistent TSRMLS_DC) { php_url *url; - if (ctx) { - zval **val = NULL; - - if (php_stream_context_get_option(ctx, "ssl", "SNI_enabled", &val) == SUCCESS && !zend_is_true(*val TSRMLS_CC)) { - return NULL; - } - if (php_stream_context_get_option(ctx, "ssl", "SNI_server_name", &val) == SUCCESS) { - convert_to_string_ex(val); - return pestrdup(Z_STRVAL_PP(val), is_persistent); - } - } - if (!resourcename) { return NULL; } -- cgit v1.2.1 From 5ed1bdf9a5fd25d4937954002dca86a95eaabba4 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 30 Jan 2014 10:47:58 +0100 Subject: fix ZTS build --- ext/openssl/xp_ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/openssl/xp_ssl.c') diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 0a9626128f..f1525e804e 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -469,7 +469,7 @@ static inline int php_openssl_enable_crypto(php_stream *stream, if (sslsock->is_client && (php_stream_context_get_option(stream->context, "ssl", "SNI_enabled", &val) == FAILURE - || zend_is_true(*val)) + || zend_is_true(*val TSRMLS_CC)) ) { if (php_stream_context_get_option(stream->context, "ssl", "SNI_server_name", &val) == SUCCESS) { convert_to_string_ex(val); -- cgit v1.2.1 From 0893a13e3219bbd98880eb7f1a31082bc80f5ad4 Mon Sep 17 00:00:00 2001 From: Daniel Lowrey Date: Sat, 1 Feb 2014 08:13:53 -0700 Subject: Remove #if PHP_VERSION_ID version checks --- ext/openssl/xp_ssl.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'ext/openssl/xp_ssl.c') diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 69316b2ea4..92bcf0039c 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -407,11 +407,7 @@ static inline int php_openssl_setup_crypto(php_stream *stream, if (stream->context && SUCCESS == php_stream_context_get_option( stream->context, "ssl", "no_ticket", &val) && -#if PHP_VERSION_ID >= 50700 zend_is_true(*val TSRMLS_CC) -#else - zend_is_true(*val) -#endif ) { SSL_CTX_set_options(sslsock->ctx, SSL_OP_NO_TICKET); } @@ -424,11 +420,7 @@ static inline int php_openssl_setup_crypto(php_stream *stream, if (stream->context && SUCCESS == php_stream_context_get_option( stream->context, "ssl", "disable_compression", &val) && -#if PHP_VERSION_ID >= 50700 zend_is_true(*val TSRMLS_CC) -#else - zend_is_true(*val) -#endif ) { SSL_CTX_set_options(sslsock->ctx, SSL_OP_NO_COMPRESSION); } @@ -479,11 +471,7 @@ static inline int php_openssl_enable_crypto(php_stream *stream, if (sslsock->is_client && (php_stream_context_get_option(stream->context, "ssl", "SNI_enabled", &val) == FAILURE -#if PHP_VERSION_ID >= 50700 || zend_is_true(*val TSRMLS_CC)) -#else - || zend_is_true(*val)) -#endif ) { if (php_stream_context_get_option(stream->context, "ssl", "SNI_server_name", &val) == SUCCESS) { convert_to_string_ex(val); @@ -590,11 +578,7 @@ static inline int php_openssl_enable_crypto(php_stream *stream, if (SUCCESS == php_stream_context_get_option( stream->context, "ssl", "capture_peer_cert", &val) && -#if PHP_VERSION_ID >= 50700 zend_is_true(*val TSRMLS_CC)) { -#else - zend_is_true(*val)) { -#endif MAKE_STD_ZVAL(zcert); ZVAL_RESOURCE(zcert, zend_list_insert(peer_cert, php_openssl_get_x509_list_id() TSRMLS_CC)); @@ -608,11 +592,7 @@ static inline int php_openssl_enable_crypto(php_stream *stream, if (SUCCESS == php_stream_context_get_option( stream->context, "ssl", "capture_peer_cert_chain", &val) && -#if PHP_VERSION_ID >= 50700 zend_is_true(*val TSRMLS_CC)) { -#else - zend_is_true(*val)) { -#endif zval *arr; STACK_OF(X509) *chain; -- cgit v1.2.1