• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two Way SSL Authentication ::

 
Ank Sin
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a trustore with certificates and keystore with the private key.
i have put the following code, loaded the trsustore manger and keystore manager and then created the instance of SSL Context.

This below code is called whenever i am making a request to webservice.
We are using axis2 API.




1.) Issue is when i register my "HTTPS" protocol with above secureProtocolSocketFactory , it effects my whole application as a result of which i cannot get authenticated for other "HTTPS" request, can i somehow set these for a particular host only or particular webservice..???



2.) To avoid setting the above for whole "HTTPS", i thought of setting for partcular hostname



Tried with this as well


it gives me below error..

org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Where hostname is "qartap.csnet.assurity.sg" and my webservice URL is "https://qartap.csnet.assurity.sg:8443/RTAPService/RTAPService"

Either i want to set this using hostname or creating new protocol itself...I tried the approach given in the solution here. But it gave me the following exception..



I have created a trustore with certificates and keystore with the private key. i have put the following code, loaded the trsustore manger and keystore manager and then created the instance of SSL Context.

This below code is called whenever i am making a request to webservice. We are using axis2 API.

Tried with this as well


it gives me below error..

org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Where hostname is "qartap.csnet.assurity.sg" and my webservice URL is "https://qartap.csnet.assurity.sg:8443/RTAPService/RTAPService"

Issue is when i register my "HTTPS" protocol, it effects my whole application, can i somehow set these for a particular host only or particular webservice..???

Either i want to set this using hostname or creating new protocol itself...I tried the approach given in the solution here. But it gave me the following exception..

While passing the webservice URl to the generated stub constructor, i replaced the "HTTPS" from the url with my own customised "myHTTPS".

The system cannot infer the transport information from the myhttps://serverUrl:7001/app/services/RTAPDevService.RTAPDevServiceHttpSoap12Endpoint/ URL.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic