Bug #68879 [NEW]: IP Address fields in subjectAltNames not used

From: Date: Wed, 21 Jan 2015 19:40:32 +0000
Subject: Bug #68879 [NEW]: IP Address fields in subjectAltNames not used
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190120@lists.php.net to get a copy of this message
From:             fabian at ritter-vogt dot de
Operating system: openSUSE 13.1
PHP version:      5.6.4
Package:          OpenSSL related
Bug Type:         Bug
Bug description:IP Address fields in subjectAltNames not used

Description:
------------
The server at 10.2.0.1 has a certificate with CN set to the hostname and
subjectAltNames set to the hostname and also IP-Address:

X509v3 Subject Alternative Name: 
                DNS:hostname.fqdn, DNS:hostname, IP Address:10.2.0.1

The certificate is correct, the import into the local trusted CA store
worked:

$ curl https://10.2.0.1/some/file.html
Hi!

The php script below, however, prints the following error message:

Peer certificate CN=hostname' did not match expected CN=10.2.0.1'

It works if I replace "10.2.0.1" by "hostname" or "hostname.fqdn".

Test script:
---------------
<?php
file_get_contents("https://10.2.0.1/some/file.html");
?>


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



Thread (4 messages)

« previous php.bugs (#190120) next »