certificate - 如何使用 keytool 将证书创建到 PKCS12 keystore 中?

标签 certificate ssl-certificate keytool pkcs#12

我想使用 keytool 程序将证书创建为 PKCS12 keystore 格式。

keystore 具有扩展名 .pfx .

我如何实现这一目标?

最佳答案

如果 keystore 是 PKCS12 类型( .pfx ),则必须使用 -storetype PKCS12 指定它(为了可读性添加了换行符):

keytool -genkey -alias <desired certificate alias> 
    -keystore <path to keystore.pfx>
    -storetype PKCS12 
    -keyalg RSA 
    -storepass <password> 
    -validity 730 
    -keysize 2048 

关于certificate - 如何使用 keytool 将证书创建到 PKCS12 keystore 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14375185/

相关文章:

java - keystore 和 cacerts 之间相同的别名不同的 key 正常吗?或者,如何在 keystore /cacerts之间导出/导入 key ?

ios - 在我的 iOS 应用程序中使用 https (SSL) 连接

windows - Mercurial 是否访问 Windows 证书存储区?

python-2.7 - 如何忽略 pysimplesoap 中的 SSL 证书验证

ssl - 覆盖 onReceivedSslError 不适用于 Android KitKat Web View

ssl - 如何使用 CA 签名证书在 Jetty 中正确配置 SSL?

node.js - 如果 IIS 客户端证书身份验证正常,则检查 nodeJS Express

java - 使用 KeyTool 命令生成 keystore

ssl - 获取 SSL 连接以使用 STUNNEL/Win32

android - 通过为 API key 生成 SHA1 指纹让 Android Google Map v2 在发布版本中工作