php.net |  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
Votes:1
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kristianringer at catalyst-au dot net
New email:
PHP Version: OS:

 

 [2019-01-31 00:01 UTC] 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"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-31 18:08 UTC] cmb@php.net
I cannot repodruce the reported behavior on PHP-7.2 with libcurl
7.52.1.
 [2019-02-09 22:13 UTC] ramsey@php.net
-Status: Open +Status: Feedback
 [2019-02-09 22:13 UTC] 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-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] mike@php.net
Probably upstream regression: https://github.com/curl/curl/issues/3706
 [2019-03-26 17:43 UTC] mike@php.net
-Status: Open +Status: Not a bug
 [2019-03-26 17:43 UTC] mike@php.net
Upstream confirmed.
 [2019-06-18 07:04 UTC] mike@php.net
Fixed upstream.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC