]> 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 c90d0b5926ad83d64fada96394069229e637362b..bda9c2b3357eb5686a6cebc6bd9de9ebaa6e8d5d 100644 (file)
@@ -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;
                        }