• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SSL Mutual Authentication Issue

 
bhavini patel
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic