diff options
| author | Teemu Likonen | 2019-07-13 02:12:58 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-07-13 02:13:40 +0200 |
| commit | 74579d3d2bb82f300a6f2d81b7b559f0a24061db (patch) | |
| tree | dc7fc3b56c36b2b73304ccb53f78c0b7168f702f /lisp/gnus | |
| parent | d539d5868c90cecd48d7097752d2ac995b3e60cb (diff) | |
| download | emacs-74579d3d2bb82f300a6f2d81b7b559f0a24061db.tar.gz emacs-74579d3d2bb82f300a6f2d81b7b559f0a24061db.zip | |
Use the gpg --sender option
* lisp/epg.el (epg-start-encrypt)
* lisp/gnus/mml-sec.el (mml-secure-epg-encrypt): When
'mml-secure-openpgp-sign-with-sender' is non-nil message sender's
email address (in addition to its old behaviour) will also be used
to set gpg's "--sender email@domain" option.
Diffstat (limited to 'lisp/gnus')
| -rw-r--r-- | lisp/gnus/mml-sec.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 02a27b367cd..07d20285343 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el | |||
| @@ -497,7 +497,8 @@ https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18718" | |||
| 497 | 'mml2015-sign-with-sender 'mml-secure-openpgp-sign-with-sender "25.1") | 497 | 'mml2015-sign-with-sender 'mml-secure-openpgp-sign-with-sender "25.1") |
| 498 | ;mml1991-sign-with-sender did never exist. | 498 | ;mml1991-sign-with-sender did never exist. |
| 499 | (defcustom mml-secure-openpgp-sign-with-sender nil | 499 | (defcustom mml-secure-openpgp-sign-with-sender nil |
| 500 | "If t, use message sender to find an OpenPGP key to sign with." | 500 | "If t, use message sender to find an OpenPGP key to sign with. |
| 501 | Also use message's sender with GnuPG's --sender option." | ||
| 501 | :group 'mime-security | 502 | :group 'mime-security |
| 502 | :type 'boolean) | 503 | :type 'boolean) |
| 503 | 504 | ||
| @@ -913,7 +914,9 @@ If no one is selected, symmetric encryption will be performed. " | |||
| 913 | cipher signers) | 914 | cipher signers) |
| 914 | (when sign | 915 | (when sign |
| 915 | (setq signers (mml-secure-signers context signer-names)) | 916 | (setq signers (mml-secure-signers context signer-names)) |
| 916 | (setf (epg-context-signers context) signers)) | 917 | (setf (epg-context-signers context) signers) |
| 918 | (when mml-secure-openpgp-sign-with-sender | ||
| 919 | (setf (epg-context-sender context) sender))) | ||
| 917 | (when (eq 'OpenPGP protocol) | 920 | (when (eq 'OpenPGP protocol) |
| 918 | (setf (epg-context-armor context) t) | 921 | (setf (epg-context-armor context) t) |
| 919 | (setf (epg-context-textmode context) t)) | 922 | (setf (epg-context-textmode context) t)) |
| @@ -944,6 +947,8 @@ If no one is selected, symmetric encryption will be performed. " | |||
| 944 | (setf (epg-context-armor context) t) | 947 | (setf (epg-context-armor context) t) |
| 945 | (setf (epg-context-textmode context) t)) | 948 | (setf (epg-context-textmode context) t)) |
| 946 | (setf (epg-context-signers context) signers) | 949 | (setf (epg-context-signers context) signers) |
| 950 | (when mml-secure-openpgp-sign-with-sender | ||
| 951 | (setf (epg-context-sender context) sender)) | ||
| 947 | (when (mml-secure-cache-passphrase-p protocol) | 952 | (when (mml-secure-cache-passphrase-p protocol) |
| 948 | (epg-context-set-passphrase-callback | 953 | (epg-context-set-passphrase-callback |
| 949 | context | 954 | context |