• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Two Way SSL Authentication ::

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic