+2001-06-24 Simon Josefsson <jas@extundo.com>
+
+ * 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 <jas@extundo.com>
+ From Samuel Tardieu <sam@inf.enst.fr>
+
+ * 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 <jas@extundo.com>
+
+ * smime.el (smime-decrypt-region): Perhaps work.
+
+2001-06-22 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-msg.el (gnus-copy-article-buffer): Typo.
+
2001-04-06 Ralph Schleicher <rs@nunatak.allgaeu.org>
* mm-decode.el (mm-save-part): Rewrite file name.
(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))
(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)
(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)))
(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)))
(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
(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$")
(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)
(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.
(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"
(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)
+2001-06-24 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+ * gnus.texi (Summary Score Commands): Say that some commands
+ create ADAPT files.
+
+2001-06-23 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+ * gnus.texi (Duplicates): Contents of Gnus-Warning header have
+ changed. Reported by Peter J Acklam.
+
2001-06-19 Simon Josefsson <jas@extundo.com>
* gnus.texi (IMAP): Fix `imtest' discussion.
@lisp
(setq nnmail-split-fancy
'(| ;; \e$B=EJ#%a%C%;!<%8$OJ,N%$5$l$?%0%k!<%W$X9T$-$^$9!#\e(B
- ("gnus-warning" "duplication of message" "duplicate")
+ ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
;; \e$B%G!<%b%s$d%]%9%H%^%9%?!<$d;w$?$h$&$J$b$N$+$i$N\e(B
;; \e$B%a%C%;!<%8$OB>$N$H$3$m$X!#\e(B
(any mail "mail.misc")
@item f
\e$B%U%)%m!<%"%C%W\e(B (followup) \e$B$K%9%3%"$rIU$1$^$9\e(B---\e$B$3$l$OCx<TL>$H$N9gCW$r$7!"\e(B
-\e$B$3$NCx<T$X$N%U%)%m!<%"%C%W$K%9%3%"$r2C$($^$9!#\e(B
+\e$B$3$NCx<T$X$N%U%)%m!<%"%C%W$K%9%3%"$r2C$($^$9!#\e(B(\e$B$3$N%-!<$r;H$&$3$H$K$h$C\e(B
+\e$B$F\e(B @file{ADAPT} \e$B%U%!%$%k$,@8@.$5$l$^$9!#\e(B)
@item b
\e$BK\BN\e(B (body) \e$B$K%9%3%"$rIU$1$^$9!#\e(B
\e$B%X%C%@!<\e(B (head) \e$B$K%9%3%"$rIU$1$^$9!#\e(B
@item t
-\e$B%9%l%C%I$K%9%3%"$rIU$1$^$9!#\e(B
+\e$B%9%l%C%I$K%9%3%"$rIU$1$^$9!#\e(B(\e$B$3$N%-!<$r;H$&$3$H$K$h$C$F\e(B @file{ADAPT} \e$B%U%!\e(B
+\e$B%$%k$,@8@.$5$l$^$9!#\e(B)
@end table
@lisp
(setq nnmail-split-fancy
'(| ;; Messages duplicates go to a separate group.
- ("gnus-warning" "duplication of message" "duplicate")
+ ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
;; Message from daemons, postmaster, and the like to another.
(any mail "mail.misc")
;; Other rules.
@item f
Score on followups---this matches the author name, and adds scores to
-the followups to this author.
+the followups to this author. (Using this key leads to the creation of
+@file{ADAPT} files.)
@item b
Score on the body.
Score on the head.
@item t
-Score on thread.
+Score on thread. (Using this key leads to the creation of @file{ADAPT}
+files.)
@end table