From 516655fff9b5e8768315e4c6e3a8c47426f2d000 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 10 Oct 2002 00:43:38 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 4 ++++ lisp/mml1991.el | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1204c4c..005e8f5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2002-10-10 Simon Josefsson + * pgg.el (pgg-verify-region): Use it. + + * pgg-def.el (pgg-query-keyserver): New variable. + * pgg.el (pgg-decrypt-region): Bind pgg-default-user-id to key-identifier in packet. Is this a good idea? diff --git a/lisp/mml1991.el b/lisp/mml1991.el index da42eb5..04e28c6 100644 --- a/lisp/mml1991.el +++ b/lisp/mml1991.el @@ -230,7 +230,9 @@ (forward-line) ;; skip header/body separator (kill-region (point-min) (point))) (quoted-printable-decode-region (point-min) (point-max)) - (unless (let ((pgg-default-user-id (message-options-get 'message-sender))) + (unless (let ((pgg-default-user-id + (or (message-options-get 'message-sender) + pgg-default-user-id))) (pgg-sign-region (point-min) (point-max) t)) (pop-to-buffer pgg-errors-buffer) (error "Encrypt error")) @@ -244,14 +246,12 @@ (defun mml1991-pgg-encrypt (cont &optional sign) (let (headers) - ;; Don't sign headers. + ;; Strip MIME Content[^ ]: headers since it will be ASCII ARMOURED (goto-char (point-min)) - (while (not (looking-at "^$")) - (forward-line)) - (unless (eobp) ;; no headers? - (setq headers (buffer-substring (point-min) (point))) - (forward-line) ;; skip header/body separator - (kill-region (point-min) (point))) + (while (looking-at "^Content[^ ]+:") (forward-line)) + (if (> (point) (point-min)) + (progn + (kill-region (point-min) (point)))) (unless (pgg-encrypt-region (point-min) (point-max) (split-string @@ -264,7 +264,8 @@ (pop-to-buffer pgg-errors-buffer) (error "Encrypt error")) (kill-region (point-min) (point-max)) - (if headers (insert headers)) + ;;(insert "Content-Type: application/pgp-encrypted\n\n") + ;;(insert "Version: 1\n\n") (insert "\n") (insert-buffer pgg-output-buffer) t)) -- 1.7.10.4