【问题标题】:Trying to import the private key into a PKCS12 format key store, but instead I get usage note尝试将私钥导入 PKCS12 格式的密钥库,但我得到了使用说明
【发布时间】:2016-04-30 07:10:29
【问题描述】:

我正在关注本教程 http://ankitagarwal.com/wordpress/2014/05/08/https-communication-between-an-android-app-and-tomcat7-using-self-signed-certificates/

我目前在“创建包含其自签名数字证书的服务器的密钥库”部分。

当我这样做时

openssl pkcs12 –export –inkey web_server_private_key.pem –in web_server_ssl_certificate.pem –out web_server_key_store.p12

我得到使用信息...为什么?

没有导入/生成密钥。

【问题讨论】:

  • 您是否复制/粘贴了该命令?这些连字符看起来不像 ascii 连字符,更像是破折号。
  • 好眼光,@tedder42: != -
  • @Michael-sqlbot 谢谢。把它作为答案,因为我意识到我可以轻松地在本地测试它。
  • 请勿在此处发布文字图片。完全浪费您的时间和我们的带宽。发布文本。

标签: android amazon-web-services ssl openssl server


【解决方案1】:

您的复制/粘贴示例使用“花式连字符”。以下是我在本地运行时发生的情况:

openssl pkcs12 –export –inkey web_server_private_key.pem –in web_server_ssl_certificate.pem –out web_server_key_store.p12
(prints usage information, as in your screenshot)

还有 ascii 连字符:

openssl pkcs12 -export -inkey web_server_private_key.pem -in web_server_ssl_certificate.pem -out web_server_key_store.p12
Error opening input file web_server_ssl_certificate.pem

web_server_ssl_certificate.pem:没有这样的文件或目录

所以,这就解释了使用信息。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多