如何列出 GnuPG 加密消息的信息?
我仍在使用 GPG,如这篇文章中所示: How do I encrypt plaintext使用GnuPG?
我现在需要的是能够列出加密消息的各种信息(例如所有收件人),而不必解密它。我已经看到了不同命令的链接,例如 --list-only
,但似乎没有任何作用。
--list-only
将显示除您自己的密钥之外的所有密钥(如果已对您加密)。基本上,我需要能够确定该项目是否对我进行了加密,以便对其进行“归档”或采取其他操作。
有人对此有权威参考(或任何实际意见)吗?
I'm still working with GPG, as in this post: How do I encrypt plaintext with GnuPG?
What I need now is to be able to list various info (e.g. all recipients) of an encrypted message without necessarily decrypting it. I've seen links to different commands like --list-only
, but nothing seems to work.
--list-only
will display all keys but your own (if it was encrypted to you). Basically I need to be able to determine if the item was encrypted to me, so as to "file" it or take other action.
Does anyone have an authoritative reference (or any input really) on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了查看加密数据块加密的所有密钥(包括您自己的密钥)(包括您自己的密钥),您可以简单地通过如下方式使您的秘密密钥环不可用:
这告诉 GPG 不要使用任何默认密钥环(
--no-default-keyring
) 如果指定了无效/丢失的密钥环,然后继续指定无效/丢失的秘密密钥环 (--secret-keyring /dev/空
)。In order to see all keys (that are not hidden) that a block of encrypted data was encrypted to—including your own—you could simply make your secret-keyring unavailable, via something like this:
That tells GPG to not use any default keyrings (
--no-default-keyring
) if an invalid/missing keyring is specified, and then goes on to specify an invalid/missing secret-keyring (--secret-keyring /dev/null
).