您是否需要密码才能访问信任库(使用java keytool)? [英] Do you not need a password to access a truststore (made with the java keytool)?

查看:130
本文介绍了您是否需要密码才能访问信任库(使用java keytool)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用java keytool创建了一个信任库(用于没有CA证书的服务器的服务器身份验证)。但是我只是注意到一些奇怪的事我这样开始我的客户:

I just created a truststore with the java keytool (for server authentication of a server that does not have a CA cert). However I just noticed something strange. I am starting my client like this:

java -Djavax.net.ssl.trustStore=<PATHSTUFF>/client.keystore -classpath <STUFF> Client

(注意:没有指定密码)

以上呼叫有效。

但是当我尝试这个时:

java -classpath <STUFF> Client

它不起作用。 (显然它不起作用,它需要信任库)。

It does not work. (Obviously it does not work it requires the truststore).

我原本希望传递这个选项(但我没有):

I was expecting to need to pass in this option (but I did not):

-Djavax.net.ssl.trustStorePassword=mypass






问题:您是否需要密码才能访问信任库?密码只是用于修改吗?密钥库怎么样?


Question: Do you not need a password to access a truststore? Is the password just for modification? What about a keystore?

推荐答案

密码用于保护密钥库的完整性。如果您不提供任何商店密码,您仍然可以阅读密钥库的内容。命令 keytool -list 演示了这种行为(使用空密码)。

The password is used to protect the integrity of a keystore. if you don't provide any store password, you can still read the contents of the keystore. The command keytool -list demonstrates this behavior (use it with an empty password).

这篇关于您是否需要密码才能访问信任库(使用java keytool)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆