From:             jd at cpanel dot net
Operating system: RedHat Linux AS-2
PHP version:      5.2.6
PHP Bug Type:     Compile Failure
Bug description:  OpenSSL extension fails to link with OpenSSL 0.9.6

Description:
------------
PHP 5.2.6 introduces some memory cleanup code in the OpenSSL extension. 
Unfortunately, EVP_MD_CTX_cleanup() is only available with OpenSSL 0.9.7
and higher.  openssl.c needs to verify EVP_MD_CTX_cleanup() is
available...

diff -Nur php-5.2.6.orig/ext/openssl/openssl.c
php-5.2.6/ext/openssl/openssl.c
--- php-5.2.6.orig/ext/openssl/openssl.c        2008-04-07
05:44:03.000000000 -0500
+++ php-5.2.6/ext/openssl/openssl.c     2008-05-02 17:11:10.000000000
-0500
@@ -3522,7 +3522,9 @@
                efree(sigbuf);
                RETVAL_FALSE;
        }
+#if OPENSSL_VERSION_NUMBER >= 0x0090700fL
        EVP_MD_CTX_cleanup(&md_ctx);
+#endif
        if (keyresource == -1) {
                EVP_PKEY_free(pkey);
        }
@@ -3562,7 +3564,9 @@
        EVP_VerifyInit   (&md_ctx, mdtype);
        EVP_VerifyUpdate (&md_ctx, data, data_len);
        err = EVP_VerifyFinal (&md_ctx, (unsigned char *)signature,
signature_len, pkey);
+#if OPENSSL_VERSION_NUMBER >= 0x0090700fL
        EVP_MD_CTX_cleanup(&md_ctx);
+#endif
 
        if (keyresource == -1) {
                EVP_PKEY_free(pkey);



-- 
Edit bug report at http://bugs.php.net/?id=44900&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44900&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44900&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44900&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44900&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44900&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44900&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44900&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44900&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44900&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44900&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44900&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44900&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44900&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44900&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44900&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44900&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44900&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44900&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44900&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44900&r=mysqlcfg

Reply via email to