mu4e: display signers in signature header

Display the signers in the signature headers, so users can easily very
that a verified signed message was indeed signed by the expected sender.

We can't check using 'From:' automatically as that gives too many false
negatives.
This commit is contained in:
djcb
2017-08-27 17:33:37 +03:00
parent 97cb519788
commit 3a8748c549

View File

@ -460,6 +460,11 @@ add text-properties to VAL."
(remove-if 'null (remove-if 'null
(mapcar (lambda (part) (mu4e-message-part-field part :signature)) (mapcar (lambda (part) (mu4e-message-part-field part :signature))
parts))) parts)))
(signers
(mapconcat 'identity
(remove-if 'null
(mapcar (lambda (part) (mu4e-message-part-field part :signers))
parts)) ", "))
(val (when verdicts (val (when verdicts
(mapconcat (mapconcat
(lambda (v) (lambda (v)
@ -474,7 +479,7 @@ add text-properties to VAL."
(mu4e-view-verify-msg-popup (mu4e-view-verify-msg-popup
(button-get b 'msg)))) (button-get b 'msg))))
(buffer-string)))) (buffer-string))))
(val (when val (concat val " (" btn ")")))) (val (when val (concat val signers " (" btn ")"))))
(mu4e~view-construct-header :signature val t))) (mu4e~view-construct-header :signature val t)))
(defun mu4e~view-construct-decryption-header (msg) (defun mu4e~view-construct-decryption-header (msg)