This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes SSL Mutual Authentication Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "SSL Mutual Authentication Issue" Watch "SSL Mutual Authentication Issue" New topic
Author

SSL Mutual Authentication Issue

bhavini patel
Greenhorn

Joined: Dec 23, 2010
Posts: 7
I am supposed to call a web service that is written in .NET. It uses mutual Authentication. I have been give *.p7b and *.pfx file.

1. used jetty.jar to get the new jks file from *.pfx file
used instructions here - http://www.entrust.net/knowledge-base/technote.cfm?tn=7925
java -classpath lib/jetty-6.1.1.jar org.mortbay.jetty.security.PKCS12Import
You should get a message in your comand window that looks like this:
usage: java PKCS12Import {pkcs12file} [newjksfile]

This created file called - newKeystore.jks .

2. I added the server certificate by following the steps here.

http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/
This created jssecacerts file.
I merged this with #1.
keytool.exe" -importkeystore -srckeystore jssecacerts -destkeystore newKeystore.jks -srcstorepass <passwd> -deststorepass <password>

This updated the newKeyStore.jks

3. Exported the *.p7b as .cer and added it to newKeyStore.jks

Followed the steps underhttp://www.coderanch.com/t/498320/Web-Services/java/implement-certificate-security-web-service
and this is my code



I get following error

javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://crisref03/querywebservice/dataservice.asmx?WSDL. It failed with:
Server returned HTTP response code: 401 for URL: http://crisref03/querywebservice/dataservice.asmx?WSDL.


Please help!!

Do not know whats wrong...

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SSL Mutual Authentication Issue
 
Similar Threads
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
CertificateException: No name matching <hostname> found.
How to implement certificate/security into web service client
java.net.UnknownHostException in SSL
SSL enabled client code with client authentication