From: mikhail dot v dot gavrilov at gmail dot com Operating system: RHEL/Fedora PHP version: 5.4.11RC1 Package: OpenSSL related Bug Type: Bug Bug description:php not use default openSSH confing
Description: ------------ For using GOST encryption engine: 1. i compiled openSSH with GOST support 2. added the following lines in openssl.cnf openssl_conf = openssl_def [openssl_def] engines = engine_section [engine_section] gost = gost_section [gost_section] engine_id = gost default_algorithms = ALL dynamic_path = /usr/lib/openssl/engines/libgost.so CRYPT_PARAMS = id-Gost28147-89-CryptoPro-A-ParamSet But when I use curl PHP still get error: 'Cannot communicate securely with peer: no common encryption algorithm(s).' Than I search I find this solution: http://stackoverflow.com/questions/10959771/openssl-and-gost-engine-issue- statically-linked So I create patch *** 111/openssl.c 2012-12-19 12:55:19.000000000 +0600 --- openssl.c 2013-01-15 18:43:22.000000000 +0600 *************** *** 1038,1043 **** --- 1038,1046 ---- le_x509 = zend_register_list_destructors_ex(php_x509_free, NULL, "OpenSSL X.509", module_number); le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "OpenSSL X.509 CSR", module_number); + /* needed for use default config */ + OPENSSL_config(NULL); + SSL_library_init(); OpenSSL_add_all_ciphers(); OpenSSL_add_all_digests(); and my script became work. Test script: --------------- $address="https://icrs.nbki.ru/products/B2BRequestServlet"; // $proxy = '10.10.4.24:3128'; $xml = ''; $ch = curl_init($address); $page = "Xml.php"; $headers = array( "POST ".$page." HTTP/1.0", "content-type:application/octet-stream;charset=\"windows-1251\"", ); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); if(isset($proxy)) curl_setopt($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $response = curl_exec($ch);if ($response === false) throw new Exception(curl_error($ch)); curl_close($ch); -- Edit bug report at https://bugs.php.net/bug.php?id=63992&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63992&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63992&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63992&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63992&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63992&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63992&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63992&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63992&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63992&r=support Expected behavior: https://bugs.php.net/fix.php?id=63992&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63992&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63992&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63992&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63992&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63992&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63992&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63992&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63992&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63992&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63992&r=mysqlcfg