java 如何在 Windows 中打开 .ks 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39574411/
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-11-03 04:29:13  来源:igfitidea点击:

How to open a .ks file in windows?

javakeystorejava-security

提问by Kishore

I have a key.ks file that needs to be opened. Can someone please suggest how to open this file in windows. Can I use Keytool command?

我有一个需要打开的 key.ks 文件。有人可以建议如何在 Windows 中打开此文件。我可以使用 Keytool 命令吗?

回答by Diego1974

Yes you can, provided that it is in a format Java Keytool understands (jks,p12) and you have the password to operate on it.

是的,你可以,只要它是 Java Keytool 理解的格式 (jks,p12) 并且你有密码来操作它。

The usual extension is .jks but it's not mandatory. You only have to try. Use

通常的扩展名是 .jks 但它不是强制性的。你只需要尝试。利用

keytool -list -keystore [KEYSTORE_PATH_HERE]

keytool -list -keystore [KEYSTORE_PATH_HERE]

to explore it.

去探索它。

Add "-v" for verbose output of the content (keys and certificates). If it's not a real Java keystore you will see an exception telling you this, otherwise it will ask for a password and if correct, it will "open" it.

为内容(密钥和证书)的详细输出添加“-v”。如果它不是真正的 Java 密钥库,您将看到一个异常告诉您这一点,否则它将要求输入密码,如果正确,它将“打开”它。

This is very basic since there are many options (for example multiple password for different 'owners'). Btw, since Keytool is part of the JDK/JRE standard tools, this works on other OSes too.

这是非常基本的,因为有很多选项(例如,不同“所有者”的多个密码)。顺便说一句,由于 Keytool 是 JDK/JRE 标准工具的一部分,因此它也适用于其他操作系统。

回答by Sireesh Yarlagadda

Here is the solution to open the jks file with an additional argument for the password ("-storepass")

这是打开带有附加密码参数的 jks 文件的解决方案(“-storepass”)

keytool -list -v -keystore [keystore_path] -storepass [password_here]

回答by dansek

You can use key store explorer to open .ks files. Also you can download the.exe from here http://keystore-explorer.org/

您可以使用密钥存储资源管理器打开 .ks 文件。您也可以从这里下载 the.exe http://keystore-explorer.org/