Sending a certificate with Android?
I've been using CURL and php to send the following:
$ch = curl_init($url); curl_setopt_array($ch, array( CURLOPT_POST => count($postfields), CURLOPT_POSTFIELDS => $postfields, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => 2, CURLOPT_VERBOSE => true, CURLOPT_SSLCERT => 'C:\mycert.pem', CURLOPT_SSLCERTPASSWD => 'mypass', CURLOPT_SSLCERTTYPE => 'PEM' ));
I've not included the postfields to keep it brief.
This works very well. However after much googling I can't find a simple way to do this using HTTPClient. I just want to include a certificate with the POST.
You need to create a trust store containing your certificate.
My blog post at http://blog.chariotsolutions.com/2013/01/https-with-client-certificates-on.html contains a little more than you need (it includes supporting self-signed client and server certs), but should give you everything you need.