Bug #77548 [NEW]: curl_getinfo() does not correctly parse 'Signiture Algorithm' field

From: Date: Thu, 31 Jan 2019 00:01:33 +0000
Subject: Bug #77548 [NEW]: curl_getinfo() does not correctly parse 'Signiture Algorithm' field
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219307@lists.php.net to get a copy of this message
From: kristianringer at catalyst-au dot net Operating system: PHP version: Irrelevant Package: cURL related Bug Type: Bug Bug description:curl_getinfo() does not correctly parse 'Signiture Algorithm' field Description: ------------ The returned data certinfo object has 'Signiture Algorithm' as part of a string, when it should be returned as its own element in the associative array. Looks like it is incorrectly parsing the returned certificate data. If you run this script and look through the var dump for the returned 'Public Key Algorithm' data, you can see the problem. It happens in php5.6, php7.0, php7.2. Test script: --------------- <?php $curl = curl_init('https://www.google.com'); curl_setopt($curl, CURLOPT_CERTINFO, 1); $ret = curl_exec($curl); $info = curl_getinfo($curl); var_dump($info); Expected result: ---------------- 'Public Key Algorithm' => string(23) "sha256WithRSAEncryption" 'Signature Algorithm' => string(23) "sha256WithRSAEncryption" Actual result: -------------- 'Public Key Algorithm' => string(72) " Signature Algorithm: sha256WithRSAEncryption sha256WithRSAEncryption" -- Edit bug report at https://bugs.php.net/bug.php?id=77548&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77548&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77548&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77548&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77548&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77548&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77548&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77548&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77548&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77548&r=support Expected behavior: https://bugs.php.net/fix.php?id=77548&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77548&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77548&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77548&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77548&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77548&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77548&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77548&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77548&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77548&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77548&r=mysqlcfg

« previous php.bugs (#219307) next »