summaryrefslogtreecommitdiff
path: root/lisp/gnus/mml2015.el
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2013-05-22 13:18:40 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2013-05-22 13:18:40 +0000
commita4e7e8ae1384ff477aaa45ca2189d447e214c7e7 (patch)
treea3d997be9b36dbd6e4f5baf2ddf9e21e52697e07 /lisp/gnus/mml2015.el
parentca5995ecca6b6bb281dd548d7cc2c5582fa635b9 (diff)
downloademacs-a4e7e8ae1384ff477aaa45ca2189d447e214c7e7.tar.gz
emacs-a4e7e8ae1384ff477aaa45ca2189d447e214c7e7.tar.bz2
emacs-a4e7e8ae1384ff477aaa45ca2189d447e214c7e7.zip
lisp/gnus/mml2015.el (mml2015-epg-sign): Make sure to insert newline after the signed data to conform the standard (Bug#14232)
Diffstat (limited to 'lisp/gnus/mml2015.el')
-rw-r--r--lisp/gnus/mml2015.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index c3905b88e7b..5d122dfbe40 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -1085,6 +1085,10 @@ If no one is selected, default secret key is used. "
(epg-context-set-passphrase-callback
context
#'mml2015-epg-passphrase-callback))
+ ;; Signed data must end with a newline (RFC 3156, 5).
+ (goto-char (point-max))
+ (unless (bolp)
+ (insert "\n"))
(condition-case error
(setq signature (epg-sign-string context (buffer-string) t)
mml2015-epg-secret-key-id-list nil)