From: Antony Dovgal Date: Thu, 22 Apr 2010 15:59:44 +0000 (+0000) Subject: revert most of the Andrey's patch that causes segfaults X-Git-Tag: php-5.4.0alpha1~191^2~1692 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a15efa6979a063bf1c307ecd2896ef73cb085a29;p=php revert most of the Andrey's patch that causes segfaults (as agreed with Pierre) --- diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index c90d0b5926..bda9c2b335 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -4443,7 +4443,6 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ EVP_PKEY *key = NULL; SSL *tmpssl; char resolved_path_buff[MAXPATHLEN]; - const char * private_key = NULL; if (VCWD_REALPATH(certfile, resolved_path_buff)) { /* a certificate to use for authentication */ @@ -4452,10 +4451,8 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ return NULL; } - GET_VER_OPT_STRING("local_pk", private_key); - - if (private_key && SSL_CTX_use_PrivateKey_file(ctx, private_key, SSL_FILETYPE_PEM) != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set private key file `%s'", private_key); + if (SSL_CTX_use_PrivateKey_file(ctx, reso, SSL_FILETYPE_PEM) != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set private key file `%s'", resolved_path_buff); return NULL; }