My ultimate goal is to route emails using gpg's fingerprinting. This is
the first step toward that goal. That is all.

Lua doesn't have GPGME bindings, so you'll likely have to do this the error-prone way: fire up GnuPG and verify the signature, after hooking up --status-fd to a file descriptor of your choice. _Do not_ parse the normal console output: only the status-fd output should be used.

When verifying a message with gpg --verify, you'll see a message stanza like:

[GNUPG:] KEY_CONSIDERED CC11BE7CBBED77B120F37B011DCBDC01B44427C7 0
[GNUPG:] SIG_ID qtBYYa4lfH60IDd2oOz06S6QBjc 2026-01-08 1767855159
[GNUPG:] GOODSIG 1DCBDC01B44427C7 Robert J. Hansen <[email protected]>

The first, KEY_CONSIDERED, gives you the full fingerprint. If you then see GOODSIG the message has passed its signature verification and then you can have Lua do what you want with the message.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Gnupg-users mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to