将旧样式.p12转换为.pem(不支持算法RC2-40-CBC)

发布于 2025-02-12 17:29:51 字数 341 浏览 0 评论 0原文

似乎仍然存在一些工具,这些工具生成了使用RC2-40-CBC加密的私钥,

尽管我能够使用Keytool -ImportKeystore将其导出到新的密钥存储中摆脱该算法。

如何将它们转换为PEM?

OpenSSL失败:

digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:349:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()

There seem to exist still some tools which generate private keys encrypted with RC2-40-CBC

Although I'm able to export it to a new key store using keytool -importkeystore it seems that I can't get rid of this algorithm.

How to convert them to PEM ?

OpenSSL fails with:

digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:349:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

·深蓝 2025-02-19 17:29:51

Openssl具有称为legacy的密钥算法提供商。只需尝试:

openssl pkcs12 -in mycert.p12 -legacy -nodes

openssl has a key algorithm provider called legacy. Just try with:

openssl pkcs12 -in mycert.p12 -legacy -nodes
逆光下的微笑 2025-02-19 17:29:51

您可以在OpenSSL配置中将其倒置。只需修改文件/etc/ssl/openssl.cnf

查找[default_sect] e节,然后将其更改为:

[default_sect]
activate = 1
[legacy_sect]
activate = 1

然后找到[provider_sect] and code> and code>使用:

[provider_sect]
default = default_sect
legacy = legacy_sect

保存文件。

You can change it permamently in OpenSSL configuration. Just modify file /etc/ssl/openssl.cnf

Find the [default_sect] section and change it to:

[default_sect]
activate = 1
[legacy_sect]
activate = 1

Then find the [provider_sect] and use:

[provider_sect]
default = default_sect
legacy = legacy_sect

Save file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文