|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77548 curl_getinfo() does not correctly parse 'Signiture Algorithm' field
Submitted: 2019-01-31 00:01 UTC Modified: 2019-06-18 07:04 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: kristianringer at catalyst-au dot net Assigned:
Status: Not a bug Package: cURL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: kristianringer at catalyst-au dot net
New email:
PHP Version: OS:


 [2019-01-31 00:01 UTC] kristianringer at catalyst-au dot net
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:
$curl = curl_init('');
curl_setopt($curl, CURLOPT_CERTINFO, 1);
$ret = curl_exec($curl);
$info = curl_getinfo($curl);

Expected result:
'Public Key Algorithm' =>
      string(23) "sha256WithRSAEncryption"

'Signature Algorithm' =>
      string(23) "sha256WithRSAEncryption"

Actual result:
'Public Key Algorithm' =>
      string(72) "    Signature Algorithm: sha256WithRSAEncryption


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-31 18:08 UTC]
I cannot repodruce the reported behavior on PHP-7.2 with libcurl
 [2019-02-09 22:13 UTC]
-Status: Open +Status: Feedback
 [2019-02-09 22:13 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

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-02-13 22:08 UTC] kristianringer at catalyst-au dot net
-Status: Feedback +Status: Open
 [2019-02-13 22:08 UTC] kristianringer at catalyst-au dot net
OS: Ubuntu 18.04.1 LTS
Libcurl version: 7.58.0
PHP: PHP 7.0.33
 [2019-03-26 14:22 UTC]
Probably upstream regression:
 [2019-03-26 17:43 UTC]
-Status: Open +Status: Not a bug
 [2019-03-26 17:43 UTC]
Upstream confirmed.
 [2019-06-18 07:04 UTC]
Fixed upstream.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Mar 09 04:01:24 2021 UTC