ChartBlocks / php-ssrs

PHP library for connecting to SSRS over SOAP
MIT License
25 stars 22 forks source link

Update NTLM.php #14

Closed SmokeyBrandie closed 9 years ago

SmokeyBrandie commented 9 years ago

SSL Support If option curlopt_cainfo is not null CURLOPT_SSL_VERIFYPEER will be set to true and CURLOPT_CAINFO will contain the crt file provided in option curlopt_cainfo

rb-cohen commented 9 years ago

Thanks for the pull request. Setting curl options will be useful.

With #14 and #15, what about letting users send an array of curl options, so we don't have to provide methods for each curl option. Something like this:

 $options = array(
    'username' => 'xxxxxxxx',
    'password' => 'xxxxxxxxxx',
    'cache_wsdl_path' => '/tmp',
    'curl_options' => array(
        CURLOPT_SSL_VERIFYPEER => true,
        CURLOPT_SSL_VERIFYHOST => 2,
        CURLOPT_CAINFO => '/path/to/cainfo'
    ),
);

Then in NTLM.php we do:

foreach($curlOptions as $key => $value){
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, true);
}

I can make the changes later today, unless you're able to make the changes?

SmokeyBrandie commented 9 years ago

Much better idea! I close this request and submit the a new one.