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

From: Date: Thu, 31 Jan 2019 18:08:00 +0000
Subject: Bug #77548 [Opn]: curl_getinfo() does not correctly parse 'Signiture Algorithm' field
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219312@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77548&edit=1

 ID:                 77548
 Updated by:         cmb@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:

I cannot repodruce the reported behavior on PHP-7.2 with libcurl
7.52.1.


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#219312) next »