]> granicus.if.org Git - php/commitdiff
revert most of the Andrey's patch that causes segfaults
authorAntony Dovgal <tony2001@php.net>
Thu, 22 Apr 2010 15:59:44 +0000 (15:59 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 22 Apr 2010 15:59:44 +0000 (15:59 +0000)
(as agreed with Pierre)

ext/openssl/openssl.c

index 0b91cec6d0c0e5fa735b66338f5ecfc1c00307c9..b6d4aa286252fc7f7cfa2477f4470b32a1c104f5 100644 (file)
@@ -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;
                        }