admin管理员组

文章数量:1549475

我是SSL新手。

I am new to SSL.

我正在尝试使用keytool为SSL连接创建密钥库。 首先,我尝试了以下命令

I am trying to create keystore for SSL connection using keytool. First I tried the following command

[aniket@localhost bin]$ keytool -genkey -alias myKeyStore -keyalg RSA -keystore

/home/aniket/keystore

询问我密码和其他详细信息,最后给了我以下错误

It asked me password and other details and finally gave me following error

keytool error: java.io.FileNotFoundException: /home/aniket/keystore

(Is a directory)

所以我在keystore文件夹中创建了一个文件keystoreFile.txt并执行了

So I created a file keystoreFile.txt inside keystore folder and executed

[aniket@localhost bin]$ keytool -genkey -alias myKeyStore -keyalg RSA -keystore

/home/aniket/keystore/keystoreFile.txt

现在(没有提示输入密码等),我得到

and now(no prompt for password etc) I am getting

keytool error: java.lang.Exception: Keystore file exists, but is empty:

/home/aniket/keystore/keystoreFile.tx

文件内容应该是什么。 尽管keytool会生成密钥对(一个公共密钥和相关的私有

What should be the contents of the file. I though keytool will generate key pair (a public key and associated private

本文标签: 密钥为空文件错误Java