More info about the segfaults? Tests that show the segfaults and thus keep us from regressions?

Andrey


Antony Dovgal wrote:
tony2001                                 Thu, 22 Apr 2010 15:59:44 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=298331

Log:
revert most of the Andrey's patch that causes segfaults
(as agreed with Pierre)

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
    U   php/php-src/trunk/ext/openssl/openssl.c

Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2010-04-22 15:51:03 UTC 
(rev 298330)
+++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2010-04-22 15:59:44 UTC 
(rev 298331)
@@ -4445,7 +4445,6 @@
                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 @@
                                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;
                        }


Modified: php/php-src/trunk/ext/openssl/openssl.c
===================================================================
--- php/php-src/trunk/ext/openssl/openssl.c     2010-04-22 15:51:03 UTC (rev 
298330)
+++ php/php-src/trunk/ext/openssl/openssl.c     2010-04-22 15:59:44 UTC (rev 
298331)
@@ -4443,7 +4443,6 @@
                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 @@
                                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;
                        }





--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to