title: PHP7 cURL and SOAP request SSL failing
body: <p>I'm using PHP 7.0.25 in a vagrant VM with ubuntu 16.04</p>
  
  <p>I need to make a request to this SOAP API:
   <a href="https://ws.ocasa.com/testecommerce/service.asmx?wsdl" rel="nofollow noreferrer">https://ws.ocasa.com/testecommerce/service.asmx?wsdl</a></p>
  
  <p>Both php curl and SoapClient are failing</p>
  
  <p>With SoapClient I'm doing this (also tried with no options at all, and just the cache_wsdl part):</p>
  
  <pre><code>$options = array(
      'cache_wsdl' =&gt; 0,
      'trace' =&gt; 1,
      'stream_context' =&gt; stream_context_create(array(
            'ssl' =&gt; array(
                 'verify_peer' =&gt; false,
                  'verify_peer_name' =&gt; false,
                  'allow_self_signed' =&gt; true
            )
      ))
  );
  
  $wsdl = 'https://ws.ocasa.com/testecommerce/service.asmx?wsdl';
  $client = new \SoapClient( $wsdl, $options);
  </code></pre>
  
  <p>Giving me this error:</p>
  
  <blockquote>
    <p>[SoapFault]<br>
    SOAP-ERROR: Parsing WSDL: Couldn't load from
    '<a href="https://ws.ocasa.com/testecommerce/service.asmx?wsdl" rel="nofollow noreferrer">https://ws.ocasa.com/testecommerce/service.asmx?wsdl</a>' : failed to
    load external entity "https:<br>
    //ws.ocasa.com/testecommerce/service.asmx?wsdl"</p>
  </blockquote>
  
  <p>With php curl I endend getting this error: </p>
  
  <blockquote>
    <p>Unknown SSL protocol error in connection to ws.ocasa.com:443 </p>
  </blockquote>
  
  <p>I cant get the page from the linux curl command line without a problem (from inside the VM, of course)</p>
  
  <pre><code>curl -I https://ws.ocasa.com/testecommerce/service.asmx?wsdl -v
  </code></pre>
  
  <p>The SSL connection is using TLS1.0 / RSA_3DES_EDE_CBC_SHA1</p>
  
  <p>I tested adding</p>
  
  <pre><code>curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  </code></pre>
  
  <p>and also tried adding the CA certs: (also tried adding them in the php.ini)</p>
  
  <pre><code>curl_setopt($ch, CURLOPT_CAINFO, '/vagrant/cacert.pem');
  </code></pre>
  
  <p>Something very strange is that I can curl some other https sites without problem like <a href="http://secure.php.net" rel="nofollow noreferrer">secure.php.net</a> usgin php curl.</p>
  
  <p>Also, there is no "http" version available to get rid of the whole SSL problem.</p>
  
  <p>Any ideas? I'm missing some dependency maybe? openssl is installed.</p>
  
  <p>Thanks for your time.</p>