From bcc7dd61345b60c5a16ef3caaa96a878d1edbd45 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 7 Aug 2005 23:56:33 +0000 Subject: [PATCH] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-515 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 104) - Update from CVS 2005-08-05 Daiki Ueno * lisp/gnus/mml2015.el (mml2015-pgg-sign): Make sure micalg is correct. * lisp/gnus/pgg-parse.el (pgg-parse-hash-algorithm-alist): Add SHA-2. 2005-08-06 Romain Francoise * lisp/gnus/message.el: Fix typo in docstring. 2005-07-16 Romain Francoise * lisp/gnus/gnus-uu.el (gnus-uu-save-article): Use `message-make-date' instead of `current-time-string' as the latter creates a time string that is not RFC 2822 compliant (it lacks the zone). --- lisp/gnus/ChangeLog | 16 ++++++++++++++++ lisp/gnus/gnus-uu.el | 2 +- lisp/gnus/message.el | 2 +- lisp/gnus/mml2015.el | 17 +++++++++++++---- lisp/gnus/pgg-parse.el | 3 ++- 5 files changed, 33 insertions(+), 7 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 9f5ee5e1e33..a7b215718b0 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,13 @@ +2005-08-05 Daiki Ueno + + * mml2015.el (mml2015-pgg-sign): Make sure micalg is correct. + + * pgg-parse.el (pgg-parse-hash-algorithm-alist): Add SHA-2. + +2005-08-06 Romain Francoise + + * message.el: Fix typo in docstring. + 2005-08-05 Katsumi Yamaoka * mm-bodies.el (mm-encode-body): Use coding system rather than @@ -104,6 +114,12 @@ * mm-uu.el (mm-uu-copy-to-buffer): Use with-current-buffer. +2005-07-16 Romain Francoise + + * gnus-uu.el (gnus-uu-save-article): Use `message-make-date' + instead of `current-time-string' as the latter creates a time + string that is not RFC 2822 compliant (it lacks the zone). + 2005-07-16 Lars Magne Ingebrigtsen * gnus-msg.el (gnus-button-mailto): Remove diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index 90a2433a3c6..a2f3f353a05 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -837,7 +837,7 @@ When called interactively, prompt for REGEXP." (erase-buffer) (insert (format "Date: %s\nFrom: %s\nSubject: %s Digest\n\n" - (current-time-string) name name)) + (message-make-date) name name)) (when (and message-forward-as-mime gnus-uu-digest-buffer) (insert "<#part type=message/rfc822>\nSubject: Topics\n\n")) (insert "Topics:\n"))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 0266fe95124..7c55b7cc72f 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1443,7 +1443,7 @@ no, only reply back to the author." :type 'boolean) (defcustom message-user-fqdn nil - "*Domain part of Messsage-Ids." + "*Domain part of Message-Ids." :version "22.1" :group 'message-headers :link '(custom-manual "(message)News Headers") diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index b90dfa96338..590e9276a0f 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -642,7 +642,8 @@ (autoload 'pgg-decrypt-region "pgg") (autoload 'pgg-verify-region "pgg") (autoload 'pgg-sign-region "pgg") - (autoload 'pgg-encrypt-region "pgg")) + (autoload 'pgg-encrypt-region "pgg") + (autoload 'pgg-parse-armor "pgg-parse")) (defun mml2015-pgg-decrypt (handle ctl) (catch 'error @@ -810,15 +811,23 @@ (let ((pgg-errors-buffer mml2015-result-buffer) (boundary (mml-compute-boundary cont)) (pgg-default-user-id (or (message-options-get 'mml-sender) - pgg-default-user-id))) + pgg-default-user-id)) + entry) (unless (pgg-sign-region (point-min) (point-max)) (pop-to-buffer mml2015-result-buffer) (error "Sign error")) (goto-char (point-min)) (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n" boundary)) - ;;; FIXME: what is the micalg? - (insert "\tmicalg=pgp-sha1; protocol=\"application/pgp-signature\"\n") + (if (setq entry (assq 2 (pgg-parse-armor + (with-current-buffer pgg-output-buffer + (buffer-string))))) + (setq entry (assq 'hash-algorithm (cdr entry)))) + (insert (format "\tmicalg=%s; " + (if (cdr entry) + (downcase (format "pgp-%s" (cdr entry))) + "pgp-sha1"))) + (insert "protocol=\"application/pgp-signature\"\n") (insert (format "\n--%s\n" boundary)) (goto-char (point-max)) (insert (format "\n--%s\n" boundary)) diff --git a/lisp/gnus/pgg-parse.el b/lisp/gnus/pgg-parse.el index d0987659b96..26b48e2f141 100644 --- a/lisp/gnus/pgg-parse.el +++ b/lisp/gnus/pgg-parse.el @@ -58,7 +58,8 @@ (cons (sexp :tag "Number") (sexp :tag "Type")))) (defcustom pgg-parse-hash-algorithm-alist - '((1 . MD5) (2 . SHA1) (3 . RIPEMD160) (5 . MD2)) + '((1 . MD5) (2 . SHA1) (3 . RIPEMD160) (5 . MD2) (8 . SHA256) (9 . SHA384) + (10 . SHA512)) "Alist of the assigned number to the cryptographic hash algorithm." :group 'pgg-parse :type '(repeat -- 2.11.4.GIT