[Mew-dist 6] Re: [Q] pgp 動いてますか ?

Kazuhiko Yamamoto 山本和彦 kazu at example.com
1996年 11月 20日 (水) 15:22:12 JST


From: Kazuhiko Yamamoto 山本和彦 <kazu at example.com>
Subject: [Mew-dist 4] Re: [Q] pgp 動いてますか?
Date: Wed, 20 Nov 1996 15:13:27 +0900

> 現在は直っています。

ちなみに、以下がパッチです。

PGP/MIME は、僕の環境では安定しているのですが、環境によってはうまく動
かないようです。僕の環境で再現しないので、原因が特定できません。もし、
以下のパッチを当てても、まだ不具合が出る場合は、原因を追って頂けると幸
いです。

--かず

*** release/mew-1.51/mew-pgp.el	Mon Nov 18 11:31:56 1996
--- mew-pgp.el	Wed Nov 20 15:18:39 1996
***************
*** 7,22 ****
  ;;;
  ;;; Author:  Kazuhiko Yamamoto <kazu at example.com>
  ;;; Created: August   17, 1994
! ;;; Revised: November 16, 1996
  ;;;
  
! (defconst mew-pgp-version "mew-pgp.el version 0.27")
  
  (require 'mew)
  (if mew-emacs19-p (eval-when-compile (require 'terminal)))
  
  (defvar mew-prog-pgp "pgp")
  (defvar mew-pgp-key-suffix ".pka")
  
  (setq mew-pgp-string nil)
  (setq mew-pgp-running nil)
--- 7,23 ----
  ;;;
  ;;; Author:  Kazuhiko Yamamoto <kazu at example.com>
  ;;; Created: August   17, 1994
! ;;; Revised: November 19, 1996
  ;;;
  
! (defconst mew-pgp-version "mew-pgp.el version 0.29")
  
  (require 'mew)
  (if mew-emacs19-p (eval-when-compile (require 'terminal)))
  
  (defvar mew-prog-pgp "pgp")
  (defvar mew-pgp-key-suffix ".pka")
+ (defvar mew-pgp-ascii-suffix ".asc")
  
  (setq mew-pgp-string nil)
  (setq mew-pgp-running nil)
***************
*** 78,84 ****
        (erase-buffer)
        (insert "Version: 1\n")
        (write-region (point-min) (point-max) file2))
!     (setq file3 (make-temp-name mew-temp-file)) 
      (apply (function call-process) 
  	   mew-prog-pgp nil nil nil
  	   "-ea" "+language=en" "+batchmode=on" "+armorlines=0"
--- 79,85 ----
        (erase-buffer)
        (insert "Version: 1\n")
        (write-region (point-min) (point-max) file2))
!     (setq file3 (concat (make-temp-name mew-temp-file) mew-pgp-ascii-suffix))
      (apply (function call-process) 
  	   mew-prog-pgp nil nil nil
  	   "-ea" "+language=en" "+batchmode=on" "+armorlines=0"
***************
*** 135,141 ****
    (let (file2 process)
      (if (not (file-exists-p mew-temp-dir))
  	(mew-make-directory mew-temp-dir)) ;; just in case
!     (setq file2 (make-temp-name mew-temp-file)) 
      (setq process (start-process "PGP sign"
  				 (current-buffer) ;; xxx
  				 mew-prog-pgp
--- 136,143 ----
    (let (file2 process)
      (if (not (file-exists-p mew-temp-dir))
  	(mew-make-directory mew-temp-dir)) ;; just in case
!     (setq file2 (concat (make-temp-name mew-temp-file) mew-pgp-ascii-suffix))
!     ;; not perfectly unique but OK
      (setq process (start-process "PGP sign"
  				 (current-buffer) ;; xxx
  				 mew-prog-pgp
***************
*** 430,467 ****
  
  (defun mew-mime-pgp-keys (begin end &optional params)
    (interactive)
!   (if (not (mew-y-or-n-p "Add this PGP key onto your public keyring? "))
!       ()
!     (if (not (file-exists-p mew-temp-dir))
! 	(mew-make-directory mew-temp-dir)) ;; just in case
!     (setq mew-pgp-tmp-file (make-temp-name mew-temp-file))
!     (save-excursion
!       (set-buffer (mew-current-get 'cache))
!       (let ((file-coding-system (if mew-mule-p *noconv*)))
! 	(write-region begin end mew-pgp-tmp-file)
! 	(message "") ;; flush write-region message
! 	)
!       (set-buffer (mew-buffer-message))
!       (let ((buffer-read-only nil))
! 	(message "Adding PGP keys ... ")
! 	(call-process mew-prog-pgp nil t nil 
! 		      "+batchmode=on" "-ka" mew-pgp-tmp-file)
! 	(message "Adding PGP keys ... done")
! 	(insert "\n\n"
! 		"**************** IMPORTANT NOTE ****************\n"
! 		"When Mew adds PGP keys onto your public keyring,\n"
! 		"it is careless about both TRUST and VALIDITY.\n"
! 		"It is YOU who set these values. Please use\n"
! 		"\"pgp -ke\" and \"pgp -ks\" to change them.\n"
! 		"If you don't know what TRUST and VALIDITY is,\n"
! 		"you should learn the web of trust system BEFORE\n"
! 		"using PGP to protect your privacy.\n"
! 		"**************** IMPORTANT NOTE ****************\n"
! 		)
! 	))
!     (if (file-exists-p mew-pgp-tmp-file)
! 	(delete-file mew-pgp-tmp-file))
!     )
!   )
  
  (provide 'mew-pgp)
--- 432,471 ----
  
  (defun mew-mime-pgp-keys (begin end &optional params)
    (interactive)
!   (if (not (mew-which mew-prog-pgp exec-path))
!       (message "PGP is not found")
!     (if (not (mew-y-or-n-p "Add this PGP key onto your public keyring? "))
! 	()
!       (if (not (file-exists-p mew-temp-dir))
! 	  (mew-make-directory mew-temp-dir));; just in case
!       (setq mew-pgp-tmp-file (make-temp-name mew-temp-file))
!       (save-excursion
! 	(set-buffer (mew-current-get 'cache))
! 	(let ((file-coding-system (if mew-mule-p *noconv*)))
! 	  (write-region begin end mew-pgp-tmp-file)
! 	  (message "");; flush write-region message
! 	  )
! 	(set-buffer (mew-buffer-message))
! 	(let ((buffer-read-only nil))
! 	  (message "Adding PGP keys ... ")
! 	  (call-process mew-prog-pgp nil t nil 
! 			"+batchmode=on" "-ka" mew-pgp-tmp-file)
! 	  (message "Adding PGP keys ... done")
! 	  (insert "\n\n"
! 		  "**************** IMPORTANT NOTE ****************\n"
! 		  "When Mew adds PGP keys onto your public keyring,\n"
! 		  "it is careless about both TRUST and VALIDITY.\n"
! 		  "It is YOU who set these values. Please use\n"
! 		  "\"pgp -ke\" and \"pgp -ks\" to change them.\n"
! 		  "If you don't know what TRUST and VALIDITY is,\n"
! 		  "you should learn the web of trust system BEFORE\n"
! 		  "using PGP to protect your privacy.\n"
! 		  "**************** IMPORTANT NOTE ****************\n"
! 		  )
! 	  ))
!       (if (file-exists-p mew-pgp-tmp-file)
! 	  (delete-file mew-pgp-tmp-file))
!       )
!     ))
  
  (provide 'mew-pgp)



Mew-dist メーリングリストの案内