Commit 69de3ec6 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

Fix bug when a name has no key.

parent 9b318728
2012-09-17 Richard Stallman <rms@gnu.org>
* epa-mail.el (epa-mail-encrypt): Fix bug when a name has no key.
2012-09-17 Chong Yidong <cyd@gnu.org>
* shell.el (shell-file-name-chars, shell-file-name-quote-list)
......
......@@ -170,24 +170,26 @@ Don't use this command in Lisp programs!"
If no one is selected, symmetric encryption will be performed. "
recipients)
(if recipients
(mapcar
(lambda (recipient)
(setq recipient-key
(epa-mail--find-usable-key
(epg-list-keys
(epg-make-context epa-protocol)
(if (string-match "@" recipient)
(concat "<" recipient ">")
recipient))
'encrypt))
(unless (or recipient-key
(y-or-n-p
(format
"No public key for %s; skip it? "
recipient)))
(error "No public key for %s" recipient))
recipient-key)
recipients)))
(apply
'nconc
(mapcar
(lambda (recipient)
(setq recipient-key
(epa-mail--find-usable-key
(epg-list-keys
(epg-make-context epa-protocol)
(if (string-match "@" recipient)
(concat "<" recipient ">")
recipient))
'encrypt))
(unless (or recipient-key
(y-or-n-p
(format
"No public key for %s; skip it? "
recipient)))
(error "No public key for %s" recipient))
(if recipient-key (list recipient-key)))
recipients))))
(setq sign (if verbose (y-or-n-p "Sign? ")))
(if sign
(epa-select-keys context
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment