Bug #72878 [NEW]: PDO SSL connection
| From: | mblkblta at gmail dot com | Date: | Thu, 18 Aug 2016 07:19:12 +0000 |
| Subject: | Bug #72878 [NEW]: PDO SSL connection | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-203371@lists.php.net to get a copy of this message | ||
From: mblkblta at gmail dot com
Operating system: Windows 10
PHP version: 7.0.9
Package: PDO MySQL
Bug Type: Bug
Bug description:PDO SSL connection
Description:
------------
Peer certificate CN='SomeName' did not match expected CN='someIP' - the
main error.
We have a verify_peer_name setting by SSL connection that exists in
mysqli, smtp, openssl settings, but not in PDO. We have a link with
investigation about this question
http://stackoverflow.com/questions/36493062/php-mysql-over-ssl-peer-certificate-did-not-match,
but it can't help for PDO. All settings which could be is in test
script.
I'm not a professional, but I didn't find any decision after 3 days
searching... Ask for directing me to right way or fix it and add setting
like PDO::MYSQL_VERIFY_PEER_NAME.
Test script:
---------------
$dbInfo = array
(
'dsn' => 'mysql:host=123.45.67.890;dbname=someDB;port=3306',
'user' => 'user',
'pass' => 'userpassword'
);
$con = new PDO
(
$dbInfo['dsn'], $dbInfo['user'], $dbInfo['pass'],
[
PDO::MYSQL_ATTR_SSL_CIPHER => 'AES256-SHA',
PDO::MYSQL_ATTR_SSL_CA => 'ca-cert.pem',
PDO::MYSQL_ATTR_SSL_KEY => 'client-key.pem',
PDO::MYSQL_ATTR_SSL_CERT => 'client-cert.pem',
]
);
--
Edit bug report at https://bugs.php.net/bug.php?id=72878&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72878&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72878&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72878&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72878&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72878&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72878&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72878&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72878&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72878&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72878&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72878&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72878&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72878&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72878&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72878&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72878&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72878&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72878&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72878&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72878&r=mysqlcfg