Forums Register Login

SSL Mutual Authentication Issue

+Pie Number of slices to send: Send
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 underhttps://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
You've gotta fight it! Don't give in! Read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2730 times.
Similar Threads
SSL enabled client code with client authentication
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
java.net.UnknownHostException in SSL
CertificateException: No name matching <hostname> found.
SSL authentication problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:13:40.