title: Error consuming Web Service: :SoapClient(): SSL operation failed with code 1
body: <p>I'm trying to consume a Web Services, my friend tested in windows 7 with xampp and is working. He told me he installed a self-signed certificate.
  But i'm stuck, i get this error:</p>
  
  <p>Warning: SoapClient::SoapClient(): SSL operation failed with code 1. OpenSSL Error messages:
  error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac  in /var/www/project/lib/Zend/Soap/Client/Common.php on line 51</p>
  
  <p>Warning: SoapClient::SoapClient(): Failed to enable crypto  in /var/www/project/lib/Zend/Soap/Client/Common.php on line 51</p>
  
  <p>Warning: SoapClient::SoapClient(<a href="https://url.com/webservice?wsdl" rel="nofollow">https://url.com/webservice?wsdl</a>): failed to open stream: operation failed  in /var/www/eph_me_113/lib/Zend/Soap/Client/Common.php on line 51</p>
  
  <p>Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity &quot;<a href="https://url.com/webservice?wsdl&amp;quot" rel="nofollow">https://url.com/webservice?wsdl&amp;quot</a>;  in /var/www/eph_me_113/lib/Zend/Soap/Client/Common.php on line 51</p>
  
  <p>I been tried installing the .cert in my machine with the  certutils tools like this:</p>
  
  <p><a href="http://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu/" rel="nofollow">http://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu/</a></p>
  
  <p>After that i see the wsdl in the browser without the red page warning. The browsers tellme that now the "entity is valid". But i'm still having the same error.</p>
  
  <p>I also try adding this in my client.</p>
  
  <pre><code>$opts = array(
          'ssl'   =&gt; array(
                  'verify_peer'          =&gt; false,
                  'allow_self-signed' =&gt; true,                        
                  'ciphers' =&gt; "SHA1"
              )
          );
          $streamContext = stream_context_create($opts);
  
  $params = array(    
              'features' =&gt; SOAP_SINGLE_ELEMENT_ARRAYS,                
              'stream_context'     =&gt; $streamContext,
              'cache_wsdl' =&gt; NULL,                    
          );
  
  $client = new SoapClient($url, $params);
  </code></pre>
  
  <p>I'm very stuck here, so, i hope someone can help me.</p>
  
  <p>Note: I'm using openssl 1.0.1e and Debian 7.</p>