[Mew-dist 04614] Re: PGP public key fetch
Hideyuki SHIRAI
Shirai at example.com
1998年 5月 11日 (月) 19:58:38 JST
白井です。
From: Kazu Yamamoto (山本和彦) <kazu at example.com> さん曰く
Subject: [Mew-dist 04574] Re: PGP public key fetch
Message-ID: <19980508181034V.kazu at example.com>
Date: Fri, 8 May 1998 18:08:02 +0900
kazu> よって、C-u 無しだと X-Mew: のみを参照、C-u 付だと他もみるという仕様の
kazu> 方がいいです。
1. C-cC-f のとき、X-Mew: のみを参照。
2. C-uC-cC-f のとき、mew-x-pgp-key-list に設定したものだけ見る。
ように変えたパッチです。mew-x-pgp-key-listは過去のmew-dist
および、他のMLでgrepした結果を、今度はlistで表現しました。^^;;;
-------------- next part --------------
--- mew-pgp.el.orig Fri May 8 19:49:00 1998
+++ mew-pgp.el Mon May 11 17:10:02 1998
@@ -621,22 +621,39 @@
"fetch PGP public key."
(interactive "P")
(if (null (processp mew-pgp-fetch-key-process))
- (let (buf keyid xurl xmew uri)
+ (let (key key-list buf keyid xurl xurl-list xmew uri)
(save-excursion
(set-buffer (mew-buffer-message))
- (setq xurl (mew-header-get-value mew-x-pgp-key)
- xmew (mew-header-get-value mew-x-mew:)))
+ (cond
+ (arg
+ (setq key-list mew-x-pgp-key-list)
+ (setq key (car key-list))
+ (while key
+ (progn
+ (setq xurl (mew-header-get-value key))
+ (if (and xurl (string-match "http:[^ \t\n]*" xurl))
+ (progn
+ (setq xurl (substring xurl (match-beginning 0) (match-end 0)))
+ (setq xurl-list (append xurl-list (list xurl)))))
+ (setq key-list (cdr key-list))
+ (setq key (car key-list)))))
+ (t (setq xmew (mew-header-get-value mew-x-mew:)))))
(cond
- ((and xurl (not arg))
- (if (y-or-n-p (format "fetch from %s? " xurl))
- (setq uri xurl)))
- (xmew
+ ((and xmew (not arg))
(if (and (string-match "key. ID = \\(0x[0-9a-fA-F]+\\)" xmew nil)
(setq keyid (substring xmew (match-beginning 1) (match-end 1)))
(y-or-n-p (format "fetch key ID=%s? " keyid)))
(setq uri (format mew-pgp-keyserver-url-template keyid))
(if (not keyid)
(message "can't find PGP users key ID."))))
+ ((and xurl-list arg)
+ (setq xurl (car xurl-list))
+ (while (and xurl (not uri))
+ (progn
+ (if (y-or-n-p (format "fetch from %s? " xurl))
+ (setq uri xurl))
+ (setq xurl-list (cdr xurl-list))
+ (setq xurl (car xurl-list)))))
(t (message "can't find PGP public key's information.")))
(if uri
(mew-piolet mew-cs-autoconv mew-cs-autoconv
-------------- next part --------------
--- mew-vars.el.orig Wed May 6 23:05:24 1998
+++ mew-vars.el Mon May 11 16:00:33 1998
@@ -805,7 +805,12 @@
(defvar mew-pgp-keyserver-url-template
"http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=%s")
;; "http://www.icat.or.jp/cgi-bin/pgpsearchkey.pl?op=get&search=%s")
-(defvar mew-x-pgp-key "X-Pgp.*Key:")
+
+(defvar mew-x-pgp-key-list
+ '("x-pgp-key:" "x-pgp-key-url:" "x-pgp-public-key:" "x-pgp-public-key-url:"
+ "x-pgp5-key:" "x-pgp5-key-url:" "x-pgp5-public-key:" "x-pgp5-public-key-url:"
+ "x-public-key:"))
+
(defvar mew-pgp-fetch-key-process nil)
;;
Mew-dist メーリングリストの案内