如何将 GPG 证书转换为可导入 Windows 证书管理器的 CRT 证书?

信息安全 证书 视窗 电子邮件 隐私 gnupg
2021-08-17 17:43:30

我有一个用于电子邮件的人的 GPG 证书

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)

我想将其导入 Windows 证书管理器

伊姆古尔

所以我可以在使用证书管理器的 Thunderbird 中使用它

伊姆古尔

其中只能导入*.crt, *.cert, *.cer, *.pem, *.der.

我找不到任何相关的 https://duckduckgo.com/?q=convert+gpg+to+crt

我找到了这个

http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG,-OpenSsh-and-OpenSSL

但我无权访问 OpenPGP2SSH。

我找到了 MonkeySphere 并从源代码编译它,但它给出了一个错误。

C:>gpg --export --export-options export-reset-subkey-passwd,export-minimal,no-export-attributes  --no-armor 999999 > \cygwin\tmp\george.pub.key
$ openpgp2ssh 9999999 < george.pub.key  > george.ssh.key
We only support RSA keys (this key used algorithm 17).
We only support RSA keys (this key used algorithm 16).
No matching key found.
1个回答

简短的回答:你不能,因为它们是两个不同且不兼容的密钥+证书系统。

更长的答案:

  • Windows 证书管理器使用 X.509 证书,每个证书都必须由其根证书被 Windows 视为有效的证书颁发机构签名。Thunderbird 将使用存储在收件人证书中的公钥来加密内容。
  • OpenPGP 和 GPG 使用自己的与 X.509 无关的证书格式,并使用自己的与 S/MIME 不兼容的加密和签名机制。

SSH 与两者都无关,因此对您没有帮助。