Bug #72186 [NEW]: SSL certificate problem: unable to get local issuer certificate

From: Date: Tue, 10 May 2016 15:48:28 +0000
Subject: Bug #72186 [NEW]: SSL certificate problem: unable to get local issuer certificate
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200995@lists.php.net to get a copy of this message
From:             nbhfgq at gmail dot com
Operating system: Windows Server 2012
PHP version:      7.0.6
Package:          OpenSSL related
Bug Type:         Bug
Bug description:SSL certificate problem: unable to get local issuer certificate

Description:
------------
On my test server running OpenSSL 1.0.2h on Windows Server 2012.  The
"newest" cacert.pem fails with an error "SSL certificate problem: unable
to get local issuer certificate", however, the cacert.pem from 2014
works.

I did post this at openSSL as well... they indicated that it was not a
problem with
openSSL.[http://rt.openssl.org/Ticket/Display.html?id=4510&user=guest&pass=guest]


Test script:
---------------
<?php
$url = 'https://www.googleapis.com/books/v1/volumes?q=isbn:0747532699';
$req = curl_init($url);
curl_setopt($req, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($req);

$error = curl_errno($req);
if ($error == CURLE_SSL_PEER_CERTIFICATE || $error == CURLE_SSL_CACERT
|| $error == 77) {
        curl_setopt($req, CURLOPT_CAINFO, 'C:\xampp\php\cacert.pem');
//modify for your location...
        $result = curl_exec($req);
}

if($result === false)
{
    echo 'Curl error: ' . curl_error($req);
}
else
{
    echo 'Operation completed without any errors';
}
?>


-- 
Edit bug report at https://bugs.php.net/bug.php?id=72186&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=72186&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=72186&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=72186&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=72186&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=72186&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=72186&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=72186&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=72186&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=72186&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=72186&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=72186&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=72186&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=72186&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72186&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=72186&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=72186&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=72186&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72186&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=72186&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=72186&r=mysqlcfg



Thread (11 messages)

« previous php.bugs (#200995) next »