]> git.eshelyaron.com Git - emacs.git/commitdiff
Make mml-secure-epg-sign bug out if we can't find an identity
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 9 Oct 2019 19:55:41 +0000 (21:55 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 9 Oct 2019 19:55:45 +0000 (21:55 +0200)
* lisp/gnus/mml-sec.el (mml-secure-epg-sign): Bug out if we
couldn't find anything to sign with instead of silently pretending
to sign.
* lisp/gnus/mml-smime.el (mml-smime-epg-sign): Don't bind
inhibit-display because that makes debugging impossible.

lisp/gnus/mml-sec.el
lisp/gnus/mml-smime.el

index 51578a753dafdb4376a90b2210525af7425c7a71..c7a2d4664e8f2be9714206f605256260bcf137e7 100644 (file)
@@ -944,6 +944,8 @@ If no one is selected, symmetric encryption will be performed.  "
         (signer-names (mml-secure-signer-names protocol sender))
         (signers (mml-secure-signers context signer-names))
         signature micalg)
+    (unless signers
+      (error "Couldn't find any signer names.  Perhaps `mml-secure-smime-sign-with-sender' should be set?"))
     (when (eq 'OpenPGP protocol)
       (setf (epg-context-armor context) t)
       (setf (epg-context-textmode context) t)
index 659f2b95289884256bbba082a5e876c9ede1f9ed..6dcec9f9112325596a816d72cd0529a606ceebf3 100644 (file)
@@ -348,8 +348,7 @@ Whether the passphrase is cached at all is controlled by
 (autoload 'mml-compute-boundary "mml")
 
 (defun mml-smime-epg-sign (cont)
-  (let ((inhibit-redisplay t)
-       (boundary (mml-compute-boundary cont)))
+  (let ((boundary (mml-compute-boundary cont)))
     (goto-char (point-min))
     (let* ((pair (mml-secure-epg-sign 'CMS cont))
           (signature (car pair))