]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "Revert "Give better errors in signing failures in Gnus""
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 15:18:53 +0000 (17:18 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 15:18:53 +0000 (17:18 +0200)
This reverts commit 42141da5b0885b199636524c1e57f08ee1723aea.

This patch was reverted in error.  I misinterpreted an email saying that
it didn't work, but apparently it worked as it should.

lisp/gnus/mml1991.el
lisp/gnus/mml2015.el

index 93b1b5049a846b24f0e5291091756648e552a74d..b2056b2fd0d04f0482e688d308a12852d0dbb2d0 100644 (file)
@@ -275,6 +275,8 @@ Whether the passphrase is cached at all is controlled by
        (mm-decode-content-transfer-encoding cte)))
     (let* ((pair (mml-secure-epg-sign 'OpenPGP 'clear))
           (signature (car pair)))
+      (unless (stringp signature)
+        (error "Signature failed"))
       (delete-region (point-min) (point-max))
       (insert
        (with-temp-buffer
index 5980ddb38fec006ea2de42d2574b2d64381e95ec..403b5e1af6aa35c4c610b385a978b98a4c43f2ad 100644 (file)
@@ -958,6 +958,8 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
     (let* ((pair (mml-secure-epg-sign 'OpenPGP t))
           (signature (car pair))
           (micalg (cdr pair)))
+      (unless (stringp signature)
+        (error "Signature failed"))
       (goto-char (point-min))
       (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n"
                      boundary))