哪个是Java应用程序的密钥库/信任库的默认位置? [英] Which is the default location for keystore/truststore of Java applications?

查看:403
本文介绍了哪个是Java应用程序的密钥库/信任库的默认位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个使用SSL的应用程序。
因此,我有一个虚拟密钥库和一个我想要提供给客户的虚拟信任库。
是否有任何默认文件夹将它们放入我的发行版中?
,例如docs,lib,bin等。通常把密钥库放在服务器上的位置通常是信任库放在客户端上的位置?

I am writing an application that uses SSL. Hence, I have a dummy keystore and a dummy truststore I want to supply to my customer. Is there any default folder to put them inside my distribution? e.g. docs, lib, bin...etc. Where is usually the keystore put on the server and where is usually truststore put on the client?

谢谢

推荐答案

在Java中,根据 JSSE参考指南密钥库没有默认值, truststore的默认值 jssecacerts,如果它存在。否则,cacerts

In Java, according to the JSSE Reference Guide, there is no default for the keystore, the default for the truststore is "jssecacerts, if it exists. Otherwise, cacerts".

一些应用程序使用〜 /.keystore 作为默认密钥库,但这并非没有问题(主要是因为您可能不希望用户运行的所有应用程序都使用该信任库)。

A few applications use ~/.keystore as a default keystore, but this is not without problems (mainly because you might not want all the application run by the user to use that trust store).

我建议使用与您的应用程序捆绑在一起的特定于应用程序的值,它通常会更适用。

I'd suggest using application-specific values that you bundle with your application instead, it would tend to be more applicable in general.

这篇关于哪个是Java应用程序的密钥库/信任库的默认位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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