client certs (how to)

From: Date: Sat, 06 Sep 2003 05:32:03 +0000
Subject: client certs (how to)
Groups: php.general 
Request: Send a blank email to php-general+get-161850@lists.php.net to get a copy of this message
Hello, I am trying to post to a site that requires me to use a client cert. I can get it to work for both windows and unix, but only on the command line. I have tried without success to use the PHP built-in methods for doing this. Here is the command line that works: curl -d "<myxml>" -k -E myCert.pem:myPassword https://www.mysite.com/Listener.exe Any ideas of how to make this work with the curl_setopt methods? I tried variations of this: $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 2); curl_setopt ($ch, CURLOPT_SSLKEY, 'myCert.pem'); curl_setopt ($ch, CURLOPT_SSLKEYPASSWD, 'myPassword'); $result = curl_exec ($ch); Plus where does the data go? I know there is the POST_FIELDS option but I have XML. Any thoughts? Thanks, Scott

« previous php.general (#161850) next »