ID:               43158
 Updated by:       [EMAIL PROTECTED]
 Reported By:      p dot vanbrouwershaven at networking4all dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         cURL related
 Operating System: Linux *** 2.6.8-2-686 #1 Tue Au
 PHP Version:      5.2CVS-2008-07-21
 New Comment:

That is a bug in libcurl.


Thanks.


Previous Comments:
------------------------------------------------------------------------

[2008-07-21 12:34:09] p dot vanbrouwershaven at networking4all dot com

I tried with php5.2-200807211030 but the problem still exists.

curl_error returns:

SSL: certificate subject name 'www.verisign.com' does not match target
host name 'verisign.com'

curl_getinfo returns:

Array
(
    [url] => https://verisign.com/
    [content_type] => text/html
    [http_code] => 301
    [header_size] => 182
    [request_size] => 135
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 1.072121
    [namelookup_time] => 0.184282
    [connect_time] => 0.342402
    [pretransfer_time] => 0.905169
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 1.07203
    [redirect_time] => 0
    [certinfo] => 
)

------------------------------------------------------------------------

[2007-10-31 11:35:19] p dot vanbrouwershaven at networking4all dot com

There was a space in my post just before http:// this is not the
problem but just an error in my post.

$url = ' https://verisign.com';

Array
(
    [url] => https://verisign.com
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0
    [namelookup_time] => 3.5E-05
    [connect_time] => 0.155727
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 0
    [redirect_time] => 0
)

------------------------------------------------------------------------

[2007-10-31 10:51:45] p dot vanbrouwershaven at networking4all dot com

Description:
------------
I have some problems with the curl. On the console I get the right
response message but in PHP I see no difference between a valid and an
invalid SSL Certificate.

Curl command in PHP:

        $url = ' https://verisign.com';

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        curl_setopt($ch, CURLE_OPERATION_TIMEOUTED, 10);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
        $result = curl_exec ($ch);
        $info = curl_getinfo($ch);
        curl_close ($ch);

        print_r($info);

Curl command on console:

        curl -I https://verisign.com

Console result:

curl -I https://verisign.com
curl: (51) SSL: certificate subject name 'www.verisign.com' does not
match target host name 'verisign.com' 

PHP Result:
[ssl_verify_result] => 0



Reproduce code:
---------------
$url = ' https://verisign.com';
        
$ch = curl_init();
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLE_OPERATION_TIMEOUTED, 10);
curl_setopt($ch, CURLOPT_URL, $url); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);

$result = curl_exec ($ch);
$info = curl_getinfo($ch);
curl_close ($ch);

print_r($info);

Expected result:
----------------
Array
(
    [url] =>  https://verisign.com
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 51
    [redirect_count] => 0
    [total_time] => 0
    [namelookup_time] => 0
    [connect_time] => 0
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 0
    [redirect_time] => 0
)

Actual result:
--------------
Array
(
    [url] =>  https://verisign.com
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0
    [namelookup_time] => 0
    [connect_time] => 0
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 0
    [redirect_time] => 0
)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43158&edit=1

Reply via email to