Showing posts with label security. Show all posts
Showing posts with label security. Show all posts

Aug 7, 2011

unable to find valid certification path to requested target

Hi,

The issue: You are probably missing the certificate for the specific site you work with.

Solution: You need to add export the certificate for the site mentioned above, After exporting it, add it to the cacerts file of java (default file) which located usually here : "c:\Program Files\Java\jdk1.6.0_23\jre\lib\security".
(the default java password for this file is 'changeit').

* If you need the export procedure, tell me, it's simple i can guide you.

In the code, add this lines :

System.setProperty("javax.net.ssl.trustStore", "path_to_cacerts_file/cacerts"); // for example c:\cert\cacerts
System.setProperty("javax.net.ssl.trustStorePassword", "changeit"); //unless you change it


You can also create your own certificate storage file and direct java to it instead.

Helpful link to keytool can be found here.

Nov 23, 2010

Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Hi,
This exception might occur in:
1) Your key store file is corrupt and you should create it again.
(send a post if you need any help)
2) Your application failed loading the certificates key store (mentioned above).
Hoped i helped,
Dor