summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2010-04-22 15:59:44 +0000
committerAntony Dovgal <tony2001@php.net>2010-04-22 15:59:44 +0000
commitc996aea40d21671a3d62260fa4964fabcf7b58ac (patch)
treed3600035f3b4384050a0ed43a543268795edece1
parentf71444c756c245586cf997d8869f45e002b45a44 (diff)
downloadphp-git-c996aea40d21671a3d62260fa4964fabcf7b58ac.tar.gz
revert most of the Andrey's patch that causes segfaults
(as agreed with Pierre)
-rw-r--r--ext/openssl/openssl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 0b91cec6d0..b6d4aa2862 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -4445,7 +4445,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 */
@@ -4454,10 +4453,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, resolved_path_buff, SSL_FILETYPE_PEM) != 1) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set private key file `%s'", resolved_path_buff);
return NULL;
}