From a4e7e8ae1384ff477aaa45ca2189d447e214c7e7 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Wed, 22 May 2013 13:18:40 +0000 Subject: [PATCH] lisp/gnus/mml2015.el (mml2015-epg-sign): Make sure to insert newline after the signed data to conform the standard (Bug#14232) --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/mml2015.el | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 80eaf708bc9..6ec0cf56cc0 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2013-05-22 Daiki Ueno + + * mml2015.el (mml2015-epg-sign): Make sure to insert newline after the + signed data to conform the standard. (Bug#14232) + 2013-05-20 Adam Sjøgren * gnus-spec.el (gnus-parse-complex-format): Use unicode escape for left 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) -- 2.39.2