SSL keystore path in eclipse

为君一笑 提交于 2021-02-06 11:01:52

问题


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?


回答1:


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"



回答2:


You can set this in eclipse.ini file which will be in the root of the eclipse folder.



来源:https://stackoverflow.com/questions/44130840/ssl-keystore-path-in-eclipse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!