• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

java.io.IOException: Keystore was tampered with

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone, would you help me to overcome this exception that's been bugging me for 2 days?

in my project there is a call to a web service of a public service, the functionality that invokes the serviziofunziona perfectly but to switch from the test environment to "production" require client authentication using a digital certificate issued by them.

I installed without problems certificate in a custom keystore, whose path and password will be included in the 'application during installation (because it will live together with other modules but will rimanerne "wildly" separated):



now I'm trying to place the use of this keystore in the code.
I have taken two paths:

simply by setting the properties of the system with "javax.net.ssl.xxx" but it does not work, the sergeant exception is raised:

Here is the code:




and then analyzing some of the alternatives, the result of hours of "google" I tried the following with no major improvements:



so I get an exception simpler but essentially the same:



 
Enrico Ascaruta Tangau
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This first obstacle seems to be behind us.
I changed my class to generate the ssl socket,
I checked out The password (actually it was stored on the database with a space for more ..)
I asked for the keystore file to the client in order to use its private key for the certificate import .
But even now I find myself in front of an exception that prevents me from going to include the certificate and for which boast plenty of time "gooooogle" was useless: I have found a lot, and I found nothing;

"keytool error java.lang.Exception: failed to Establish chain from reply".

I'm trying to run the following command keytool


Someone can help me?!
 
The only thing that kept the leeches off of me was this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic