This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Security and the fly likes Using client certificate in Apache HttpClient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Using client certificate in Apache HttpClient" Watch "Using client certificate in Apache HttpClient" New topic
Author

Using client certificate in Apache HttpClient

sumit anand kumar
Ranch Hand

Joined: Apr 28, 2010
Posts: 83
Unfortunately my previous post was locked because of my accidental repost, and since this is the right location. I am reposting the question

I have a X509Certificate thats present at my local disk. I googled but can't find a straight forward answer. How to use my "crt" file to make communication with a url present in Apache.

Any example with HttpsClient of apache will do. Or even the steps are welcomed that will help me figure this out.
I have installed the ca.crt , mydomain.crt & mydomain.key file in the apache httpd.conf. I also have a mydomain.pem file. Using this pem file i can do curl and my request was processed.

Same i want to do through APache HttpClient 4.1.

I saw doc for AUthSSLProtocolSocketFactory, and i undertand i need to create my keystore & truststore. I am very naive in this. Could someone share a easy example that help me solve this task.
What i have been trying so far, i am getting the exception, "Peer not authenticated"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using client certificate in Apache HttpClient
 
Similar Threads
parsing url content into string
Can HttpUnit be used to mock an HTTP Server?
How to use client certificate in my httpsclient
Netbeans Libraries Question