PHP Classes

HTTPS and Certificates

Recommend this page to a friend!

      PHP HTTP protocol client  >  All threads  >  HTTPS and Certificates  >  (Un) Subscribe thread alerts  
Subject:HTTPS and Certificates
Summary:How to connect using certificates
Messages:4
Author:Alex van der Wilk
Date:2007-01-29 09:54:00
Update:2007-01-30 09:37:04
 

  1. HTTPS and Certificates   Reply   Report abuse  
Picture of Alex van der Wilk Alex van der Wilk - 2007-01-29 09:54:00
Is it possible to use the http client with ssl certificates. I have to cummunicate with a soap server over https with client certificate and passphrase!

regards Alex

  2. Re: HTTPS and Certificates   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-01-29 19:56:40 - In reply to message 1 from Alex van der Wilk
Yes, you can use the SSLCertificateFile and SSLCertificatePassword parameters. Take a look at the test_http.php example script to see how you use that. It is commented code.

  3. Re: HTTPS and Certificates   Reply   Report abuse  
Picture of Alex van der Wilk Alex van der Wilk - 2007-01-30 08:06:22 - In reply to message 2 from Manuel Lemos
Thanks, this works great, now the next step for me is to make a combination of ssl verification via certificates and connect to a soap service. I'll give it a try with the test_soap example.

regards alex

  4. Re: HTTPS and Certificates   Reply   Report abuse  
Picture of Alex van der Wilk Alex van der Wilk - 2007-01-30 09:37:04 - In reply to message 3 from Alex van der Wilk
by the way i changed the http.php, if you need to send your ServerCa cert too you need an extra line:

if(IsSet($arguments["SSLRootCertificateFile"]))
curl_setopt($this->connection,CURLOPT_CAINFO,$arguments["SSLRootCertificateFile"]);


my next problem is combining the soap example with the test_http sample, when i add my certificate lines to the test_http_soap example and add my own soap request internet explorer hangs and no errors are found in the error.log

can you give me a hint where this goes wrong?

regards alex