+2005-02-22 Simon Josefsson <jas@extundo.com>
+
+ * encrypt.el (encrypt-password-cache-expiry): Remove (use
+ `password-cache-expiry' instead). Reported by Arne J\e,Ax\e(Brgensen
+ <arne@arnested.dk>.
+ (encrypt): Add password-cache and password-cache-expiry as group
+ members.
+
+2005-02-22 Arne J\e,Ax\e(Brgensen <arne@arnested.dk>
+
+ * 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\e,Ax\e(Brgensen <arne@arnested.dk>
* nnrss.el (nnrss-verbose): Removed.
;;; 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 <tzz@lifelogs.com>
;; Created: 2003/01/24
(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:
;;; 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 <simon@josefsson.org>
;; 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
(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))
;; 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)))
(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")