From 3722811395fef76193efe805439a8a05c76d5ea7 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Sat, 4 Dec 2010 21:54:20 +0000 Subject: [PATCH] make sure the stream context is present before looking for any options and fix segfault --- ext/openssl/xp_ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 93ccf2826c..93658876c9 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -373,7 +373,7 @@ static inline int php_openssl_setup_crypto(php_stream *stream, { zval **val; - if (SUCCESS == php_stream_context_get_option( + if (stream->context && SUCCESS == php_stream_context_get_option( stream->context, "ssl", "no_ticket", &val) && zval_is_true(*val)) { SSL_CTX_set_options(sslsock->ctx, SSL_OP_NO_TICKET); -- 2.50.1