[Mew-dist 13626] Re: PGP 6.5.1i
Shigeki Fujii
fujii at example.com
2000年 7月 12日 (水) 23:50:59 JST
こんばんは。
大阪の藤井と申します。
> (*1)の件と、1箇所 typo と思われるとこが有ったので、1.95b43 に藤井さんの
> パッチを当て、その後に当てるパッチです。
二宮さんの指摘と"mew-pgp-msg-no-seckey-or-secring"のPGP6用の
定義が足りなかったので追加したバッチをつくりなおしました。
1.94.2 用です。
> +force=on も付けた方が良いような気もするけどっ、、、
これはPGP6のソースを読みきっていないのでとりあえずつけていません。
----
藤井 茂樹 (Shigeki Fujii)
fujii at example.com
-------------- next part --------------
*** mew-1.94.2/mew-pgp.el.orig Mon Feb 28 12:52:41 2000
--- mew-1.94.2/mew-pgp.el Wed Jul 12 23:37:31 2000
***************
*** 17,32 ****
;;; PGP 2.6.x is supported.
;;; PGP 5.x is supported. But very ad-hoc.
;;; GNUPG 0.9.x is supported. But very ad-hoc.
;;;
(defvar mew-pgp-ver nil
! "Automatically set 0 if PGP version is 2. Set 1 if 5. Set 2 if GNUPG.")
(defconst mew-pgp-ver2 0)
(defconst mew-pgp-ver5 1)
! (defconst mew-pgp-verg 2)
! (defconst mew-pgp-list '("PGPv2" "PGPv5" "GNUPG"))
! (defconst mew-pgp-keys '(pgpv2 pgpv5 gnupg)) ;; use symbols, cases are string
;; mew-prog-pgp is used only for version check
(defvar mew-prog-pgp2 "pgp") ;; "pgp263i", PGP selection
--- 17,34 ----
;;; PGP 2.6.x is supported.
;;; PGP 5.x is supported. But very ad-hoc.
;;; GNUPG 0.9.x is supported. But very ad-hoc.
+ ;;; PGP 6.x is supported. But very ad-hoc.
;;;
(defvar mew-pgp-ver nil
! "Automatically set 0 if PGP version is 2. Set 1 if 5. Set 2 if 6. Set 3 if GNUPG.")
(defconst mew-pgp-ver2 0)
(defconst mew-pgp-ver5 1)
! (defconst mew-pgp-ver6 2)
! (defconst mew-pgp-verg 3)
! (defconst mew-pgp-list '("PGPv2" "PGPv5" "PGPv6" "GNUPG"))
! (defconst mew-pgp-keys '(pgpv2 pgpv5 pgpv6 gnupg)) ;; use symbols, cases are string
;; mew-prog-pgp is used only for version check
(defvar mew-prog-pgp2 "pgp") ;; "pgp263i", PGP selection
***************
*** 35,110 ****
(defvar mew-prog-pgp5s "pgps")
(defvar mew-prog-pgp5v "pgpv")
(defvar mew-prog-pgp5k "pgpk")
(defvar mew-prog-gpg "gpg") ;; PGP selection
! (defvar mew-prog-pgpe (list mew-prog-pgp2 mew-prog-pgp5e mew-prog-gpg))
! (defvar mew-prog-pgps (list mew-prog-pgp2 mew-prog-pgp5s mew-prog-gpg))
! (defvar mew-prog-pgpv (list mew-prog-pgp2 mew-prog-pgp5v mew-prog-gpg))
! (defvar mew-prog-pgpd (list mew-prog-pgp2 mew-prog-pgp5v mew-prog-gpg))
! (defvar mew-prog-pgpk (list mew-prog-pgp2 mew-prog-pgp5k mew-prog-gpg))
(defconst mew-prog-pgpe-arg
'(("-ea" "+language=en" "+batchmode=on" "+armorlines=0")
("-a" "+language=en" "+batchmode=on" "+armorlines=0")
("--encrypt" "--armor" "--batch")))
(defconst mew-prog-pgpd-arg
'(("+language=en" "+batchmode=off")
("+language=en" "+batchmode=off")
("--decrypt")))
(defconst mew-prog-pgps-arg
'(("-sba" "+language=en" "+batchmode=off")
("-ba" "+language=en" "+batchmode=off")
("--detach-sign" "--armor")))
(defconst mew-prog-pgpv-arg
'(("+batchmode=on" "+language=en")
("+batchmode=on" "+language=en" "+force=on")
("--verify" "--batch")))
! (defconst mew-prog-arg-output '("-o" "-o" "--output"))
! (defconst mew-prog-arg-input '(nil "-o" nil))
! (defconst mew-prog-arg-luserid '("-u" "-u" "--local-user"))
! (defconst mew-prog-arg-ruserid '(nil "-r" "--remote-user"))
(defconst mew-prog-pgpk-add-arg
! '(("-ka" "+batchmode=on") ("-a" "+batchmode=on") ("--import" "--batch")))
(defconst mew-prog-pgpk-ext-arg
! '(("-kxfa") ("-xa") ("--export" "--armor" "--batch")))
(defconst mew-pgp-msg-signature
'("\n\\(.*\\) signature from user \\(.*\\)\\."
"\n\\(.*\\) signature made"
" \\(.*\\) signature from \"\\(.*\\)\""))
(defconst mew-pgp-msg-key-id
'("Key ID \\(\\S +\\) not found"
": \\(0x[0-9A-Za-z]+\\)"
"xxx"))
(defconst mew-pgp-msg-bad-pass
! '("No passphrase" "Cannot unlock private key\\|It can only be decrypted" "bad passphrase"))
(defconst mew-pgp-msg-enter
! '("Enter" "Enter" "xxx"))
(defconst mew-pgp-msg-enter-pass
! '("Enter pass phrase: " "Enter pass phrase: " "Enter passphrase: "))
(defconst mew-pgp-msg-reenter-pass
! '("Enter pass phrase: " "Enter pass phrase: " "Enter passphrase: "))
(defconst mew-pgp-msg-no-enckey
! '("Key matching" "No encryption keys" "public key not found"))
(defconst mew-pgp-msg-no-validkey
! '("DUMMY" "^WARNING:[ -9;-~\n]+belongs? to:" "no info to calculate a trust probability")) ;;xxx
(defconst mew-pgp-msg-no-vrfkey
! '("Key matching" "unknown keyid" "public key not found"))
(defconst mew-pgp-msg-no-keyring
! '("Keyring file" "Keyring file" "public key not found"))
(defconst mew-pgp-msg-no-seckey-or-secring
'("You do not have the secret key"
"Cannot find a private key"
": decryption failed: secret key not available"))
(defconst mew-pgp-msg-unsupported
'("Unsupported packet format" ;; including algorithms and packets
"Unsupported packet format\\|None of the signatures were understood"
"xxx"))
(defconst mew-pgp-verify-addr
! '(".* \\(signature from user\\) " "\\( \\)" "gpg: .* \\(from\\|aka\\) "))
;; 2: ASCII armor corrupted
;; 3:
--- 37,129 ----
(defvar mew-prog-pgp5s "pgps")
(defvar mew-prog-pgp5v "pgpv")
(defvar mew-prog-pgp5k "pgpk")
+ (defvar mew-prog-pgp6 "pgp") ;; "pgp651i", PGP selection
(defvar mew-prog-gpg "gpg") ;; PGP selection
! (defvar mew-prog-pgpe
! (list mew-prog-pgp2 mew-prog-pgp5e mew-prog-pgp6 mew-prog-gpg))
! (defvar mew-prog-pgps
! (list mew-prog-pgp2 mew-prog-pgp5s mew-prog-pgp6 mew-prog-gpg))
! (defvar mew-prog-pgpv
! (list mew-prog-pgp2 mew-prog-pgp5v mew-prog-pgp6 mew-prog-gpg))
! (defvar mew-prog-pgpd
! (list mew-prog-pgp2 mew-prog-pgp5v mew-prog-pgp6 mew-prog-gpg))
! (defvar mew-prog-pgpk
! (list mew-prog-pgp2 mew-prog-pgp5k mew-prog-pgp6 mew-prog-gpg))
(defconst mew-prog-pgpe-arg
'(("-ea" "+language=en" "+batchmode=on" "+armorlines=0")
("-a" "+language=en" "+batchmode=on" "+armorlines=0")
+ ("-ea" "+language=en" "+batchmode=on" "+armorlines=0")
("--encrypt" "--armor" "--batch")))
(defconst mew-prog-pgpd-arg
'(("+language=en" "+batchmode=off")
("+language=en" "+batchmode=off")
+ ("+language=en" "+batchmode=off")
("--decrypt")))
(defconst mew-prog-pgps-arg
'(("-sba" "+language=en" "+batchmode=off")
("-ba" "+language=en" "+batchmode=off")
+ ("-sba" "+language=en" "+batchmode=off")
("--detach-sign" "--armor")))
(defconst mew-prog-pgpv-arg
'(("+batchmode=on" "+language=en")
("+batchmode=on" "+language=en" "+force=on")
+ ("+batchmode=on" "+language=en")
("--verify" "--batch")))
! (defconst mew-prog-arg-output '("-o" "-o" "-o" "--output"))
! (defconst mew-prog-arg-input '(nil "-o" nil nil))
! (defconst mew-prog-arg-luserid '("-u" "-u" "-u" "--local-user"))
! (defconst mew-prog-arg-ruserid '(nil "-r" nil "--remote-user"))
(defconst mew-prog-pgpk-add-arg
! '(("-ka" "+batchmode=on") ("-a" "+batchmode=on") ("-ka" "+batchmode=on") ("--import" "--batch")))
(defconst mew-prog-pgpk-ext-arg
! '(("-kxfa") ("-xa") ("-kxfa") ("--export" "--armor" "--batch")))
(defconst mew-pgp-msg-signature
'("\n\\(.*\\) signature from user \\(.*\\)\\."
"\n\\(.*\\) signature made"
+ "\\([0-9A-Za-z]*\\) signature from user \\(.*\\)\\."
" \\(.*\\) signature from \"\\(.*\\)\""))
(defconst mew-pgp-msg-key-id
'("Key ID \\(\\S +\\) not found"
": \\(0x[0-9A-Za-z]+\\)"
+ ": \\(0x[0-9A-Za-z]+\\)"
"xxx"))
(defconst mew-pgp-msg-bad-pass
! '("No passphrase" "Cannot unlock private key\\|It can only be decrypted" "Bad pass phrase" "bad passphrase"))
(defconst mew-pgp-msg-enter
! '("Enter" "Enter" "Enter" "xxx"))
(defconst mew-pgp-msg-enter-pass
! '("Enter pass phrase: " "Enter pass phrase: " "Enter pass phrase: " "Enter passphrase: "))
(defconst mew-pgp-msg-reenter-pass
! '("Enter pass phrase: " "Enter pass phrase: " "Enter pass phrase: " "Enter passphrase: "))
(defconst mew-pgp-msg-no-enckey
! '("Key matching" "No encryption keys" "public key matching" "public key not found"))
(defconst mew-pgp-msg-no-validkey
! '("DUMMY"
! "^WARNING:[ -9;-~\n]+belongs? to:"
! "^WARNING:[ -9;-~\n]+belongs? to:"
! "no info to calculate a trust probability")) ;;xxx
(defconst mew-pgp-msg-no-vrfkey
! '("Key matching" "unknown keyid" "key does not meet" "public key not found"))
(defconst mew-pgp-msg-no-keyring
! '("Keyring file" "Keyring file" "NO MESSAGE" "public key not found"))
(defconst mew-pgp-msg-no-seckey-or-secring
'("You do not have the secret key"
"Cannot find a private key"
+ "Signature error\\|You do not have the secret key"
": decryption failed: secret key not available"))
(defconst mew-pgp-msg-unsupported
'("Unsupported packet format" ;; including algorithms and packets
"Unsupported packet format\\|None of the signatures were understood"
+ "Unsupported packet format" ;; including algorithms and packets
"xxx"))
(defconst mew-pgp-verify-addr
! '(".* \\(signature from user\\) " "\\( \\)" ".* \\(signature from user\\) " "gpg: .* \\(from\\|aka\\) "))
;; 2: ASCII armor corrupted
;; 3:
***************
*** 113,121 ****
;; 2: ERROR: or Error:
(defconst mew-pgp-msg-no-export-key
! '("Key not found" "No keys" "nothing exported"))
! (defvar mew-pgp-micalg '("pgp-md5" "pgp-sha1" "pgp-sha1"))
;;
;;
--- 132,140 ----
;; 2: ERROR: or Error:
(defconst mew-pgp-msg-no-export-key
! '("Key not found" "No keys" "Key not found" "nothing exported"))
! (defvar mew-pgp-micalg '("pgp-md5" "pgp-sha1" "pgp-sha1" "pgp-sha1"))
;;
;;
***************
*** 182,188 ****
(goto-char (point-min))
(if (search-forward "gpg" nil t)
(setq mew-pgp-ver mew-pgp-verg)
! (setq mew-pgp-ver nil)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
--- 201,210 ----
(goto-char (point-min))
(if (search-forward "gpg" nil t)
(setq mew-pgp-ver mew-pgp-verg)
! (goto-char (point-min))
! (if (search-forward "Pretty Good Privacy(tm) Version 6" nil t)
! (setq mew-pgp-ver mew-pgp-ver6)
! (setq mew-pgp-ver nil))))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
***************
*** 787,792 ****
--- 809,816 ----
(insert "\"pgp -ke\" and \"pgp -ks\" to change them.\n"))
((equal mew-pgp-ver mew-pgp-ver5)
(insert "\"pgpk -e\" and \"pgpk -s\" to change them.\n"))
+ ((equal mew-pgp-ver mew-pgp-ver6)
+ (insert "\"pgp -ke\" and \"pgp -ks\" to change them.\n"))
((equal mew-pgp-ver mew-pgp-verg)
(insert "\"gpg --edit-key\" to change them.\n")))
(insert "If you don't know what TRUST and VALIDITY is,\n"
*** mew-1.94.2/mew-decode.el.orig Wed Dec 22 12:08:53 1999
--- mew-1.94.2/mew-decode.el Fri Jul 7 01:53:58 2000
***************
*** 693,699 ****
(if existp
(progn
(setq file1 (mew-save-transfer-form (point-min) end1 'retain))
! (setq file2 (mew-save-decode-form syntax2))))
(setq unknown t))
;;
(delete-region end1 (point-max))
--- 693,703 ----
(if existp
(progn
(setq file1 (mew-save-transfer-form (point-min) end1 'retain))
! (setq file2 (concat file1 ".sig"))
! (mew-flet
! (write-region (mew-syntax-get-begin syntax2)
! (mew-syntax-get-end syntax2)
! file2 nil 'no-msg))))
(setq unknown t))
;;
(delete-region end1 (point-max))
Mew-dist メーリングリストの案内