Bug #77548 [Opn]: curl_getinfo() does not correctly parse 'Signiture Algorithm' field
Edit report at https://bugs.php.net/bug.php?id=77548&edit=1
ID: 77548
Updated by: mike@php.net
Reported by: kristianringer at catalyst-au dot net
Summary: curl_getinfo() does not correctly parse 'Signiture
Algorithm' field
Status: Open
Type: Bug
Package: cURL related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Probably upstream regression: https://github.com/curl/curl/issues/3706
Previous Comments:
------------------------------------------------------------------------
[2019-02-13 22:08:42] kristianringer at catalyst-au dot net
OS: Ubuntu 18.04.1 LTS
Libcurl version: 7.58.0
PHP: PHP 7.0.33
------------------------------------------------------------------------
[2019-02-09 22:13:31] ramsey@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Please provide OS information and version of libcurl.
------------------------------------------------------------------------
[2019-01-31 18:08:00] cmb@php.net
I cannot repodruce the reported behavior on PHP-7.2 with libcurl
7.52.1.
------------------------------------------------------------------------
[2019-01-31 00:01:33] kristianringer at catalyst-au dot net
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 this bug report at https://bugs.php.net/bug.php?id=77548&edit=1
Thread (7 messages)