Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL keystore path in eclipse

Tags:

java

eclipse

ssl

In my user home directory there is a .keystore file. Whenever I do keytool -list I get:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 0 entries

However while running junit tests from Eclipse, the JVM is always referring to this keystore. How can I change this path to another keystore path, for example, C:\Users\abc123\jdk1.8.0_65\jre\lib\security\cacerts from Eclipse.

I have tried

Debug As --> Debug Configuration --> Junit --> VM arguments

-Djavax.net.ssl.trustStore="C:/Users/b91255/jdk1.8.0_65/jre/lib/security/cacerts "
-Djavax.net.ssl.trustStorePassword="changeit"

I am getting a certification chaining error. How can I ask eclipse to use C:\Users\abc123\jdk1.8.0_65\jre\lib\security\cacerts as the SSL keystore?

like image 214
Ashish Banker Avatar asked May 23 '17 09:05

Ashish Banker


People also ask

Where is the keystore file located?

The default location is /Users/<username>/. android/debug. keystore.

What keystore does Eclipse use?

By default, Eclipse uses the Java trust store at $JAVA_HOME/lib/security/cacerts.

How do I fix SSL certificate error in Eclipse?

Steps: Download CA certificate from this page: https://www.startssl.com/root (Use the first one - Root 1, downloading the DER version.) The cacerts file password is "changeit". After restarting Eclipse everything should work.


1 Answers

in addition to @Tushar Patels answer, this is like

go to eclipse.ini file and edit:

-vmargs
-Djavax.net.ssl.trustStore="C:/Users/b91255/jdk1.8.0_65/jre/lib/security/cacerts "
-Djavax.net.ssl.trustStorePassword="changeit"
like image 83
Ashish Patil Avatar answered Sep 29 '22 19:09

Ashish Patil