Re: Kudos! Also: +1 PGP!

Subject: Re: Kudos! Also: +1 PGP!

Date: Mon, 26 Apr 2010 15:52:37 +0200

To: Jameson Rollins, notmuch@notmuchmail.org

Cc:

From: Sebastian Spaeth


We were discussing on IRC whether decryption should be handled in
notmuch show --decrypt or in emacs and I had a quick look at what it
would take for emacs. Here is a snippet of code that outputs
"Good signature from 5585F58CC827A062 Sebastian Spaeth (Private
Communication) <Sebastian@SSpaeth.de> (trust ultimate) created at
2010-04-26T14:27:07+0200 using DSA" in the minibuffer. I guess something
based on this could be used to parse the email and try to decrypt via gpg
and mark the signature status in the summary line:

(save-excursion 
  (let ((context (epg-make-context))
        (signature "-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvVhpsACgkQVYX1jMgnoGJx4wCfXYKGdlc6HixqGwvWL4E+9t+M
QusAnA97NGdSLBFH6LeS3F8x3tAMd8td
=2nbO
-----END PGP SIGNATURE-----")
                (signed-text "
teste
"))
    (epg-verify-string context signature signed-text)
    (let ((result (epg-context-result context)))
      (message (epg-verify-result-to-string (cdr (car result))))
      )))
part-000.sig (application/pgp-signature)

Thread: