bash - openssl pkcs12 从命令行设置密码
问题描述
我有一个这样的 bash 命令
openssl pkcs12 -export -out ~/certificate.pfx -inkey /etc/letsencrypt/live/exapmle.com/privkey.pem -in /etc/letsencrypt/live/exapmle.com/cert.pem -certfile /etc/letsencrypt/live/exapmle.com/chain.pem
现在将要求我输入密码来加密 .pfx 文件。那么有什么方法可以从命令行设置密码以不每次都手动执行此操作?
解决方案
结果命令是
openssl pkcs12 -password pass:your_password -export -out ~/certificate.pfx -inkey /etc/letsencrypt/live/exapmle.com/privkey.pem -in /etc/letsencrypt/live/exapmle.com/cert.pem -certfile /etc/letsencrypt/live/exapmle.com/chain.pem
推荐阅读
- python - 如何修复导入错误:使用 VScode 在 python 中没有名为...的模块
- excel - 为什么逗号分隔或命名范围 SEARCH() 函数在 Excel 中不起作用
- linux - 如何在不同的操作系统上处理 fileinfo.sys()
- python - 从 Tensorflow 迁移到 PyTorch 时模型定义的注意事项
- haskell - 如何产生无限二叉树?
- r - 替换特殊字符不适用于 gsub
- vue.js - 如何推送具有不同参数的路线?
- python - 如何在 Python 中跟踪用户的猜测?尝试 = 尝试 + 1 不起作用
- ruby-on-rails - postgreSQL 日期记录仅在 Rails 中持续到某个时间点
- arrays - Sass:如何管理数组的单个字符串中的空格