com php-src: Fixed build breakage from b4b4d9697f: ext/openssl/ xp_ssl.c
| From: | rdlowrey@php.net | Date: | Thu, 30 Jan 2014 00:57:59 +0000 |
| Subject: | com php-src: Fixed build breakage from b4b4d9697f: ext/openssl/ xp_ssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75856@lists.php.net to get a copy of this message | ||
Commit: 43432c12f176d42d35c82345caef23fb016cec82
Author: Daniel Lowrey <rdlowrey@php.net> Wed, 29 Jan 2014 17:57:59 -0700
Parents: 253a66c8d56e72b166b2d8ebfbc4b368eed4a9fb
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=43432c12f176d42d35c82345caef23fb016cec82
Log:
Fixed build breakage from b4b4d9697f
Changed paths:
M ext/openssl/xp_ssl.c
Diff:
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index cc8ea8a..0a96261 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -449,17 +449,6 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
return 0;
}
-static void enable_server_name_indication(php_stream_context *ctx, php_openssl_netstream_data_t
*sslsock)
-{
- zval **val = NULL;
-
- if (php_stream_context_get_option(ctx, "ssl", "SNI_server_name", &val) ==
SUCCESS) {
- convert_to_string_ex(val);
- SSL_set_tlsext_host_name(sslsock->ssl_handle, &val);
- } else if (sslsock->url_name) {
- SSL_set_tlsext_host_name(sslsock->ssl_handle, sslsock->url_name);
- }
-}
static inline int php_openssl_enable_crypto(php_stream *stream,
php_openssl_netstream_data_t *sslsock,
@@ -467,7 +456,6 @@ static inline int php_openssl_enable_crypto(php_stream *stream,
TSRMLS_DC)
{
int n, retry = 1;
- zval **val = NULL;
if (cparam->inputs.activate && !sslsock->ssl_active) {
struct timeval start_time,
@@ -475,13 +463,20 @@ static inline int php_openssl_enable_crypto(php_stream *stream,
int blocked = sslsock->s.is_blocked,
has_timeout = 0;
-#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
+#if OPENSSL_VERSION_NUMBER >= 0x00908070L && !defined(OPENSSL_NO_TLSEXT)
+
+ zval **val;
if (sslsock->is_client
&& (php_stream_context_get_option(stream->context, "ssl",
"SNI_enabled", &val) == FAILURE
- || zend_is_true(*val TSRMLS_CC))
+ || zend_is_true(*val))
) {
- enable_server_name_indication(stream->context, sslsock);
+ if (php_stream_context_get_option(stream->context, "ssl",
"SNI_server_name", &val) == SUCCESS) {
+ convert_to_string_ex(val);
+ SSL_set_tlsext_host_name(sslsock->ssl_handle, &val);
+ } else if (sslsock->url_name) {
+ SSL_set_tlsext_host_name(sslsock->ssl_handle, sslsock->url_name);
+ }
}
#endif