Search code examples
phpsslpearhttp-request

PHP Pear HTTP_Request force to use specified SSL version


I use PHP Pear HTTP_Request class to do http(s) requests from my PHP application. It is this library http://pear.php.net/package/HTTP_Request/docs

I want to control what SSL version is used for https requests (SSLv3, tls1 etc). Some part of my application uses curl and there is the option CURLOPT_SSLVERSION and it allows to do what i need.

I want to find the way to do same with the HTTP_Request library. Is it possible?


Solution

  • I didn't find the solution. So i had to modify the module Request.php from pear . I replaced the line

    $host = 'ssl://' . $host;
    

    I added the new property where i can set a different ssl version. tls,sslv2,sslv3 instead of 'ssl://'