导出没有导出密码的PKCS#12文件? [英] Export a PKCS#12 file without an export password?

查看:1673
本文介绍了导出没有导出密码的PKCS#12文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在生成导出一些pkcs#12文件以用于测试目的。这些文件未在生产中使用,只在自动测试期间临时存在。



我使用以下命令:

  openssl pkcs12 -export -nodes -out bundle.pfx -inkey mykey.key -in certificate.crt -certfile ca-cert.crt 

当我包括 -nodes 时,为什么坚持使用导出密码? >

我的OpenSSL版本是 OpenSSL 1.0.1f 2014年1月6日在Ubuntu Server 14.10 64位。

解决方案

在交互模式下,当提示输入密码时,只需按Enter键,就不会设置密码。



如果你想要自动化(例如作为ansible命令),使用 -passout 参数。它期望参数以 pass:mypassword 的形式。因为我们不需要密码:

  openssl pkcs12 -export -nodes -out bundle.pfx -inkey mykey.key- crt -certfile ca-cert.crt -passout pass:


I am generating exporting some pkcs#12 files for testing purposes. These files are not being used in production and only exist temporary during automated testing.

I am using the following command:

openssl pkcs12 -export -nodes -out bundle.pfx -inkey mykey.key -in certificate.crt -certfile ca-cert.crt

Why is it insisting on an export password when I have included -nodes?

My OpenSSL version is OpenSSL 1.0.1f 6 Jan 2014 on Ubuntu Server 14.10 64-bit.

解决方案

In interactive mode, when it prompts for a password, just press enter and there will be no password set.

If you are want to automate that (for example as an ansible command), use the -passout argument. It expects the parameter to be in the form pass:mypassword. Since we want no password:

openssl pkcs12 -export -nodes -out bundle.pfx -inkey mykey.key -in certificate.crt -certfile ca-cert.crt -passout pass:

这篇关于导出没有导出密码的PKCS#12文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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