eclipse eclipse中的SSL密钥库路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44130840/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 23:25:45  来源:igfitidea点击:

SSL keystore path in eclipse

javaeclipsessl

提问by Ashish Banker

In my user home directory there is a .keystorefile. Whenever I do keytool -listI get:

在我的用户主目录中有一个.keystore文件。每当我这样做时keytool -list

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\cacertsfrom Eclipse.

然而,当从 Eclipse 运行 junit 测试时,JVM 总是引用这个密钥库。如何将此路径更改为另一个密钥库路径,例如,C:\Users\abc123\jdk1.8.0_65\jre\lib\security\cacerts从 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\cacertsas the SSL keystore?

我收到认证链接错误。如何让 eclipseC:\Users\abc123\jdk1.8.0_65\jre\lib\security\cacerts用作 SSL 密钥库?

回答by Ashish Patil

in addition to @Tushar Patels answer, this is like

除了@Tushar Patels 的回答,这就像

go to eclipse.ini file and edit:

转到 eclipse.ini 文件并编辑:

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

回答by Tushar Patel

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

您可以在 eclipse.ini 文件中进行设置,该文件将位于 eclipse 文件夹的根目录中。