[patch] sign, then encrypt with mime-edit-pgp-enclose-buffer
Andreas Fuchs
asf at boinkor.net
Mon Dec 8 07:15:26 JST 2003
Hi all,
mime-edit-pgp-enclose-buffer seems to follow the order that the user
entered commands when signing/encrypting. This means that if the user
chooses to sign and encrypt the mail, she can not be certain if the
mail is first encrypted and then signed.
Anyway, the usual mode for signing & encrypting data is to sign first,
then encrypt (the rationale being that the signer would otherwise not
know what he/she signs and that people intercepting the message should
not know who signed the text). the attached patch makes
mime-edit-pgp-enclose-buffer do just that.
-------------- next part --------------
--- /home/asf/dl/src/semi-1.14.5/mime-edit.el Mon Nov 11 06:15:10 2002
+++ /usr/local/share/emacs/site-lisp/semi/mime-edit.el Sun Dec 7 22:50:06 2003
@@ -2566,18 +2566,13 @@
(match-end 0)
)))
)
- (if beg
- (dolist (pgp-processing mime-edit-pgp-processing)
- (case pgp-processing
- (sign
- (mime-edit-enclose-pgp-signed-region
- beg (point-max))
- )
- (encrypt
- (mime-edit-enclose-pgp-encrypted-region
- beg (point-max))
- )))
- )))
+ (when beg
+ (if (member 'sign mime-edit-pgp-processing)
+ (mime-edit-enclose-pgp-signed-region
+ beg (point-max)))
+ (if (member 'encrypt mime-edit-pgp-processing)
+ (mime-edit-enclose-pgp-encrypted-region
+ beg (point-max))))))
;;; @ split
-------------- next part --------------
Hope you like it,
--
Andreas Fuchs, <asf at acm.org>, asf at jabber.at, antifuchs
More information about the Emacs-mime-en
mailing list