From: yamaoka Date: Sun, 24 Jun 2001 22:23:24 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_4-02-quimby-last-~9 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0c2f53868c009d2dd16bf8030b99a4c008824a2;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2bed0a2..1accf40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,28 @@ +2001-06-24 Simon Josefsson + + * rfc2047.el (rfc2047-fold-region): The check to skip WSP + insertion when breaking lines looked for " \t" instead of "[ \t]". + (rfc2047-encode-message-header): Fold lines even if + no QP encoding is done. + +2001-06-23 Simon Josefsson + From Samuel Tardieu + + * smime.el (smime-keys): Support additional certificates. + (smime-make-certfiles): New function. + (smime-sign-region): Use previous variables. + (smime-get-certfiles): New function. + (smime-sign-buffer): Use it. + (smime-verify-region): Support both CAfile and CApath. + +2001-06-23 Simon Josefsson + + * smime.el (smime-decrypt-region): Perhaps work. + +2001-06-22 10:00:00 ShengHuo ZHU + + * gnus-msg.el (gnus-copy-article-buffer): Typo. + 2001-04-06 Ralph Schleicher * mm-decode.el (mm-save-part): Rewrite file name. diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index c4c3a55..23f5baf 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -578,7 +578,7 @@ header line with the old Message-ID." (while (looking-at message-unix-mail-delimiter) (forward-line 1)) (setq beg (point)) - (setq end (or (message-goto-body) (point))) + (setq end (or (message-goto-body) beg)) ;; Delete the headers from the displayed articles. (set-buffer gnus-article-copy) (delete-region (goto-char (point-min)) diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 7d04a83..0319794 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -127,15 +127,18 @@ Should be called narrowed to the head of the message." (save-restriction (rfc2047-narrow-to-field) (if (not (rfc2047-encodable-p)) - (if (and (eq (mm-body-7-or-8) '8bit) - (mm-multibyte-p) - (mm-coding-system-p - (car message-posting-charset))) - ;; 8 bit must be decoded. - ;; Is message-posting-charset a coding system? - (mm-encode-coding-region - (point-min) (point-max) - (car message-posting-charset))) + (prog1 + (if (and (eq (mm-body-7-or-8) '8bit) + (mm-multibyte-p) + (mm-coding-system-p + (car message-posting-charset))) + ;; 8 bit must be decoded. + ;; Is message-posting-charset a coding system? + (mm-encode-coding-region + (point-min) (point-max) + (car message-posting-charset))) + ;; No encoding necessary, but folding is nice + (rfc2047-fold-region (point-min) (point-max))) ;; We found something that may perhaps be encoded. (setq method nil alist rfc2047-header-encoding-alist) @@ -331,7 +334,7 @@ The buffer may be narrowed." (goto-char (or break qword-break)) (setq break nil qword-break nil) - (if (looking-at " \t") + (if (looking-at "[ \t]") (insert "\n") (insert "\n ")) (setq bol (1- (point))) @@ -365,7 +368,7 @@ The buffer may be narrowed." (goto-char (or break qword-break)) (setq break nil qword-break nil) - (if (looking-at " \t") + (if (looking-at "[ \t]") (insert "\n") (insert "\n ")) (setq bol (1- (point))) diff --git a/lisp/smime.el b/lisp/smime.el index 7035ac8..3bb9d9d 100644 --- a/lisp/smime.el +++ b/lisp/smime.el @@ -120,9 +120,12 @@ (defcustom smime-keys nil "Map mail addresses to a file containing Certificate (and private key). -The file is assumed to be in PEM format and not encrypted." +The file is assumed to be in PEM format. You can also associate additional +certificates to be sent with every message to each address." :type '(repeat (list (string :tag "Mail address") - (file :tag "File name"))) + (file :tag "File name") + (repeat :tag "Additional certificate files" + (file :tag "File name")))) :group 'smime) (defcustom smime-CA-directory nil @@ -206,22 +209,32 @@ If nil, use system defaults." (4 (message "OpenSSL: An error occurred decrypting or verifying the message.") nil) (t (error "Unknown OpenSSL exitcode") nil))) +(defun smime-make-certfiles (certfiles) + (if certfiles + (append (list "-certfile" (expand-file-name (car certfiles))) + (smime-make-certfiles (cdr certfiles))))) + ;; Sign+encrypt region -(defun smime-sign-region (b e keyfile) - "Sign region with certified key in KEYFILE. +(defun smime-sign-region (b e keyfiles) + "Sign region with certified key in KEYFILES. If signing fails, the buffer is not modified. Region is assumed to -have proper MIME tags. KEYFILE is expected to contain a PEM encoded -private key and certificate." - (let ((buffer (generate-new-buffer (generate-new-buffer-name " *smime*"))) +have proper MIME tags. KEYFILES is expected to contain a PEM encoded +private key and certificate as its car, and a list of additional certificates +to include in its caar." + (let ((keyfile (car keyfiles)) + (certfiles (and (cdr keyfiles) (cadr keyfiles))) + (buffer (generate-new-buffer (generate-new-buffer-name " *smime*"))) (passphrase (smime-ask-passphrase))) (if passphrase (setenv "GNUS_SMIME_PASSPHRASE" passphrase)) (prog1 (when (apply 'smime-call-openssl-region b e buffer "smime" "-sign" "-signer" (expand-file-name keyfile) - (if passphrase - (list "-passin" "env:GNUS_SMIME_PASSPHRASE"))) + (append + (smime-make-certfiles certfiles) + (if passphrase + (list "-passin" "env:GNUS_SMIME_PASSPHRASE")))) (delete-region b e) (insert-buffer buffer) (when (looking-at "^MIME-Version: 1.0$") @@ -253,6 +266,14 @@ is expected to contain of a PEM encoded certificate." (insert-buffer buffer)) (kill-buffer buffer)))) +(defun smime-get-certfiles (keyfile keys) + (if keys + (let ((curkey (car keys)) + (otherkeys (cdr keys))) + (if (string= keyfile (cadr curkey)) + (caddr curkey) + (smime-get-certfiles keyfile otherkeys))))) + ;; Sign+encrypt buffer (defun smime-sign-buffer (&optional keyfile buffer) @@ -262,11 +283,12 @@ KEYFILE should contain a PEM encoded key and certificate." (with-current-buffer (or buffer (current-buffer)) (smime-sign-region (point-min) (point-max) - (or keyfile - (smime-get-key-by-email - (completing-read "Sign using which signature? " smime-keys nil nil - (and (listp (car-safe smime-keys)) - (caar smime-keys)))))))) + (if keyfile + (list keyfile (smime-get-certfiles keyfile smime-keys)) + (smime-get-key-by-email + (completing-read "Sign using which signature? " smime-keys nil nil + (and (listp (car-safe smime-keys)) + (cdr smime-keys)))))))) (defun smime-encrypt-buffer (&optional certfiles buffer) "S/MIME encrypt BUFFER for recipients specified in CERTFILES. @@ -285,12 +307,13 @@ nil." (defun smime-verify-region (b e) (let ((buffer (get-buffer-create smime-details-buffer)) - (CAs (cond (smime-CA-file - (list "-CAfile" (expand-file-name smime-CA-file))) - (smime-CA-directory - (list "-CApath" (expand-file-name smime-CA-directory))) - (t - (error "No CA configured."))))) + (CAs (append (if smime-CA-file + (list "-CAfile" + (expand-file-name smime-CA-file))) + (if smime-CA-directory + (list "-CApath" + (expand-file-name smime-CA-directory)))))) + (unless CAs (error "No CA configured.")) (with-current-buffer buffer (erase-buffer)) (if (apply 'smime-call-openssl-region b e buffer "smime" "-verify" @@ -316,10 +339,11 @@ nil." (setenv "GNUS_SMIME_PASSPHRASE" passphrase)) (when (apply 'smime-call-openssl-region b e buffer "smime" "-decrypt" - "-recip" (list keyfile) + "-recip" keyfile (if passphrase (list "-passin" "env:GNUS_SMIME_PASSPHRASE" ))) - ) + (delete-region b e) + (insert-buffer buffer)) (if passphrase (setenv "GNUS_SMIME_PASSPHRASE" "" t)) (with-current-buffer (get-buffer-create smime-details-buffer) diff --git a/texi/ChangeLog b/texi/ChangeLog index 112fe9d..0d2dda9 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,13 @@ +2001-06-24 Kai Gro,A_(Bjohann + + * gnus.texi (Summary Score Commands): Say that some commands + create ADAPT files. + +2001-06-23 Kai Gro,A_(Bjohann + + * gnus.texi (Duplicates): Contents of Gnus-Warning header have + changed. Reported by Peter J Acklam. + 2001-06-19 Simon Josefsson * gnus.texi (IMAP): Fix `imtest' discussion. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index d57e440..df98e8d 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -12011,7 +12011,7 @@ Quoted Readable $BId9f2=$rI|9f2=$7$^$9!#(B @lisp (setq nnmail-split-fancy '(| ;; $B=EJ#%a%C%;!<%8$OJ,N%$5$l$?%0%k!<%W$X9T$-$^$9!#(B - ("gnus-warning" "duplication of message" "duplicate") + ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate") ;; $B%G!<%b%s$d%]%9%H%^%9%?!<$d;w$?$h$&$J$b$N$+$i$N(B ;; $B%a%C%;!<%8$OB>$N$H$3$m$X!#(B (any mail "mail.misc") @@ -15359,7 +15359,8 @@ File Editing})$B!#(B @item f $B%U%)%m!<%"%C%W(B (followup) $B$K%9%3%"$rIU$1$^$9(B---$B$3$l$OCx$H$N9gCW$r$7!"(B -$B$3$NCx