From 140a1df0b6e28ffb580f061c866a8a2335888182 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 22 Feb 2005 22:18:41 +0000 Subject: [PATCH] Synch to No Gnus 200502221722. --- lisp/ChangeLog | 28 ++++++++++++++++++++++++++++ lisp/encrypt.el | 14 +++----------- lisp/mml-sec.el | 13 ++++++++++--- lisp/mml.el | 6 ++++++ 4 files changed, 47 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ffe4bfb..1140a3c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,31 @@ +2005-02-22 Simon Josefsson + + * encrypt.el (encrypt-password-cache-expiry): Remove (use + `password-cache-expiry' instead). Reported by Arne J,Ax(Brgensen + . + (encrypt): Add password-cache and password-cache-expiry as group + members. + +2005-02-22 Arne J,Ax(Brgensen + + * smime.el (smime-ldap-host-list): Doc fix. + (smime-ask-passphrase): Use `password-read-and-add' to read (and + cache) password. + (smime-sign-region): Use it. + (smime-decrypt-region): Use it. + (smime-sign-buffer): Signal an error if `smime-sign-region' fails. + (smime-encrypt-buffer): Signal an error if `smime-encrypt-region' + fails. + (smime-cert-by-ldap-1): Use `base64-encode-string' to convert + certificate from DER to PEM format rather than calling openssl. + + * mml-smime.el (mml-smime-encrypt-query): Remove obsolete comment. + + * mml-sec.el (mml-secure-message): Insert keyfile/certfile tags + for signing/encryption. + + * mml.el (mml-parse-1): Use them. + 2005-02-21 Arne J,Ax(Brgensen * nnrss.el (nnrss-verbose): Removed. diff --git a/lisp/encrypt.el b/lisp/encrypt.el index 61c21a6..e5da278 100644 --- a/lisp/encrypt.el +++ b/lisp/encrypt.el @@ -1,5 +1,5 @@ ;;; encrypt.el --- file encryption routines -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Teodor Zlatanov ;; Created: 2003/01/24 @@ -39,18 +39,10 @@ (autoload 'password-cache-remove "password") (defvar password-cache-expiry)) -(defgroup encrypt nil +(defgroup encrypt '((password-cache custom-variable) + (password-cache-expiry custom-variable)) "File encryption configuration.") -(defcustom encrypt-password-cache-expiry 200 - "Encryption password timeout. -When set, directly sets password-cache-expiry" - :type 'integer - :group 'encrypt - :set (lambda (symbol value) - (set symbol value) - (setq password-cache-expiry value))) - (defcustom encrypt-file-alist nil "List of file names or regexes matched with encryptions. Format example: diff --git a/lisp/mml-sec.el b/lisp/mml-sec.el index c4be37e..bbb08ba 100644 --- a/lisp/mml-sec.el +++ b/lisp/mml-sec.el @@ -1,5 +1,5 @@ ;;; mml-sec.el --- A package with security functions for MML documents -;; Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Simon Josefsson @@ -224,6 +224,13 @@ You can also customize or set `mml-signencrypt-style-alist' instead." ;; defuns that add the proper <#secure ...> tag to the top of the message body (defun mml-secure-message (method &optional modesym) (let ((mode (prin1-to-string modesym)) + (tags (append + (if (or (eq modesym 'sign) + (eq modesym 'signencrypt)) + (funcall (nth 2 (assoc method mml-sign-alist)))) + (if (or (eq modesym 'encrypt) + (eq modesym 'signencrypt)) + (funcall (nth 2 (assoc method mml-encrypt-alist)))))) insert-loc) (mml-unsecure-message) (save-excursion @@ -232,8 +239,8 @@ You can also customize or set `mml-signencrypt-style-alist' instead." (concat "^" (regexp-quote mail-header-separator) "\n") nil t) (goto-char (setq insert-loc (match-end 0))) (unless (looking-at "<#secure") - (mml-insert-tag - 'secure 'method method 'mode mode))) + (apply 'mml-insert-tag + 'secure 'method method 'mode mode tags))) (t (error "The message is corrupted. No mail header separator")))) (when (eql insert-loc (point)) diff --git a/lisp/mml.el b/lisp/mml.el index 89cc301..2558fe5 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -158,6 +158,8 @@ one charsets.") ;; included in the message (let* (secure-mode (taginfo (mml-read-tag)) + (keyfile (cdr (assq 'keyfile taginfo))) + (certfile (cdr (assq 'certfile taginfo))) (recipients (cdr (assq 'recipients taginfo))) (sender (cdr (assq 'sender taginfo))) (location (cdr (assq 'tag-location taginfo))) @@ -181,6 +183,10 @@ one charsets.") (setq tags (list "sign" method "encrypt" method)))) (eval `(mml-insert-tag ,secure-mode ,@tags + ,(if keyfile "keyfile") + ,keyfile + ,(if certfile "certfile") + ,certfile ,(if recipients "recipients") ,recipients ,(if sender "sender") -- 1.7.10.4