summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lowrey <rdlowrey@php.net>2014-01-31 14:18:31 -0700
committerDaniel Lowrey <rdlowrey@php.net>2014-01-31 14:18:31 -0700
commit58293fb533a9838b517a608afb95ee8ff9a8616c (patch)
treeed382fd05495d132d238faceb32b5a5307b10a9e
parent1207461d143719923825399533a4b002aa1d5425 (diff)
downloadphp-git-58293fb533a9838b517a608afb95ee8ff9a8616c.tar.gz
Use master-agnostic zend_is_true checks
-rw-r--r--ext/openssl/xp_ssl.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 0a9626128f..69316b2ea4 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -407,7 +407,12 @@ 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) &&
- zval_is_true(*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);
}
}
@@ -419,7 +424,12 @@ 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) &&
- zval_is_true(*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);
}
}
@@ -469,7 +479,11 @@ 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);
@@ -576,7 +590,11 @@ static inline int php_openssl_enable_crypto(php_stream *stream,
if (SUCCESS == php_stream_context_get_option(
stream->context, "ssl",
"capture_peer_cert", &val) &&
- zval_is_true(*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));
@@ -590,7 +608,11 @@ 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) &&
- zval_is_true(*val)) {
+#if PHP_VERSION_ID >= 50700
+ zend_is_true(*val TSRMLS_CC)) {
+#else
+ zend_is_true(*val)) {
+#endif
zval *arr;
STACK_OF(X509) *chain;