CVS update by daiki packages/xemacs-packages/easypg, epa-dired.el, epa.el ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Wed Feb 6 21:56:04 EST 2008


  User: daiki   
  Date: 08/02/07 03:56:04

  Modified:    packages/xemacs-packages/easypg ChangeLog NEWS configure.ac
                        epa-dired.el epa-file.el epa-mail.el epa-setup.el
                        epa.el epg-config.el epg-package-info.el.in epg.el
Log:
Synch easypg to upstream 0.0.16

Revision  Changes    Path
1.2       +22 -0     XEmacs/packages/xemacs-packages/easypg/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- ChangeLog	2007/09/16 13:16:05	1.1
+++ ChangeLog	2008/02/07 02:56:02	1.2
@@ -1,3 +1,25 @@
+2008-02-07  Daiki Ueno  <ueno at unixuser.org>
+
+	* EasyPG: Version 0.0.16 released.
+	* configure.ac: Bump up version.
+
+2008-02-06  Daiki Ueno  <ueno at unixuser.org>
+
+	* epa-file.el (epa-file-passphrase-callback-function): Use
+	canonical file names as keys for cache.
+
+2008-01-22  Daiki Ueno  <ueno at unixuser.org>
+
+	* epa-mail.el (epa-mail--find-usable-key): New function.
+	(epa-mail-encrypt): Use it.
+	Reported by intrigeri <intrigeri at boum.org>.
+
+2007-11-26  Daiki Ueno  <ueno at unixuser.org>
+
+	* epg-package-info.el.in (epg-bug-report-address): New constant.
+
+	* configure.ac: Use modern AC_INIT.
+
 2007-09-06  Norbert Koch  <viteno at xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.01 released.



1.2       +9 -0      XEmacs/packages/xemacs-packages/easypg/NEWS

Index: NEWS
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/NEWS,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- NEWS	2007/09/16 13:16:06	1.1
+++ NEWS	2008/02/07 02:56:02	1.2
@@ -1,3 +1,12 @@
+* Major changes in 0.0.16
+
+** This will be the final version released under GPL2+.  Subsequent
+   versions will be released under GPL3+.
+
+** epa-mail-encrypt now skips unusable keys.
+
+** epa-file now uses canonical file names as keys for passphrase cache.
+
 * Major changes in 0.0.15
 
 ** Fixed a load-error of epa on XEmacs.



1.2       +3 -3      XEmacs/packages/xemacs-packages/easypg/configure.ac

Index: configure.ac
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/configure.ac,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- configure.ac	2007/09/16 13:16:09	1.1
+++ configure.ac	2008/02/07 02:56:02	1.2
@@ -1,7 +1,7 @@
-AC_INIT
+AC_PREREQ(2.61)
+AC_INIT([epg], [0.0.16], [ueno at unixuser.org])
 AC_CONFIG_SRCDIR([configure.ac])
-AC_PREREQ(2.59)
-AM_INIT_AUTOMAKE(epg, 0.0.15)
+AM_INIT_AUTOMAKE
 
 AC_CHECK_EMACS
 AC_PATH_LISPDIR



1.2       +1 -1      XEmacs/packages/xemacs-packages/easypg/epa-dired.el

Index: epa-dired.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/epa-dired.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- epa-dired.el	2007/09/16 13:16:09	1.1
+++ epa-dired.el	2008/02/07 02:56:02	1.2
@@ -13,7 +13,7 @@
 
 ;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License



1.2       +16 -13    XEmacs/packages/xemacs-packages/easypg/epa-file.el

Index: epa-file.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/epa-file.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- epa-file.el	2007/09/16 13:16:09	1.1
+++ epa-file.el	2008/02/07 02:56:02	1.2
@@ -13,7 +13,7 @@
 
 ;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
@@ -105,18 +105,21 @@ May either be a string or a list of stri
 (defun epa-file-passphrase-callback-function (context key-id file)
   (if (and epa-file-cache-passphrase-for-symmetric-encryption
 	   (eq key-id 'SYM))
-      (let ((entry (assoc file epa-file-passphrase-alist))
-	    passphrase)
-	(or (copy-sequence (cdr entry))
-	    (progn
-	      (unless entry
-		(setq entry (list file)
-		      epa-file-passphrase-alist (cons entry
-						 epa-file-passphrase-alist)))
-	      (setq passphrase (epa-passphrase-callback-function context
-								 key-id nil))
-	      (setcdr entry (copy-sequence passphrase))
-	      passphrase)))
+      (progn
+	(setq file (file-truename file))
+	(let ((entry (assoc file epa-file-passphrase-alist))
+	      passphrase)
+	  (or (copy-sequence (cdr entry))
+	      (progn
+		(unless entry
+		  (setq entry (list file)
+			epa-file-passphrase-alist
+			(cons entry
+			      epa-file-passphrase-alist)))
+		(setq passphrase (epa-passphrase-callback-function context
+								   key-id nil))
+		(setcdr entry (copy-sequence passphrase))
+		passphrase))))
     (epa-passphrase-callback-function context key-id nil)))
 
 (defun epa-file-handler (operation &rest args)



1.2       +31 -17    XEmacs/packages/xemacs-packages/easypg/epa-mail.el

Index: epa-mail.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/epa-mail.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- epa-mail.el	2007/09/16 13:16:09	1.1
+++ epa-mail.el	2008/02/07 02:56:02	1.2
@@ -13,7 +13,7 @@
 
 ;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
@@ -44,6 +44,19 @@
   "A minor-mode for composing encrypted/clearsigned mails."
   nil " epa-mail" epa-mail-mode-map)
 
+(defun epa-mail--find-usable-key (keys usage)
+  "Find a usable key from KEYS for USAGE."
+  (catch 'found
+    (while keys
+      (let ((pointer (epg-key-sub-key-list (car keys))))
+	(while pointer
+	  (if (and (memq usage (epg-sub-key-capability (car pointer)))
+		   (not (memq (epg-sub-key-validity (car pointer))
+			      '(revoked expired))))
+	      (throw 'found (car keys)))
+	  (setq pointer (cdr pointer))))
+      (setq keys (cdr keys)))))
+
 ;;;###autoload
 (defun epa-mail-decrypt ()
   "Decrypt OpenPGP armors in the current buffer.
@@ -98,7 +111,7 @@ Don't use this command in Lisp programs!
    (save-excursion
      (let ((verbose current-prefix-arg)
 	   (context (epg-make-context epa-protocol))
-	   recipients recipient-keys)
+	   recipients recipient-key)
        (goto-char (point-min))
        (save-restriction
 	 (narrow-to-region (point)
@@ -129,21 +142,22 @@ Don't use this command in Lisp programs!
 If no one is selected, symmetric encryption will be performed.  "
 		  recipients)
 	       (if recipients
-		   (apply #'nconc
-			  (mapcar
-			   (lambda (recipient)
-			     (setq recipient-keys
-				   (epg-list-keys
-				    (epg-make-context epa-protocol)
-				    (concat "<" recipient ">")))
-			     (unless (or recipient-keys
-					 (y-or-n-p
-					  (format
-					   "No public key for %s; skip it? "
-					   recipient)))
-			       (error "No public key for %s" recipient))
-			     recipient-keys)
-			   recipients))))
+		   (mapcar
+		    (lambda (recipient)
+		      (setq recipient-key
+			    (epa-mail--find-usable-key
+			     (epg-list-keys
+			      (epg-make-context epa-protocol)
+			      (concat "<" recipient ">"))
+			     'encrypt))
+		      (unless (or recipient-key
+				  (y-or-n-p
+				   (format
+				    "No public key for %s; skip it? "
+				    recipient)))
+			(error "No public key for %s" recipient))
+		      recipient-key)
+		    recipients)))
 	     (setq sign (if verbose (y-or-n-p "Sign? ")))
 	     (if sign
 		 (epa-select-keys context



1.2       +25 -0     XEmacs/packages/xemacs-packages/easypg/epa-setup.el

Index: epa-setup.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/epa-setup.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- epa-setup.el	2007/09/16 13:16:09	1.1
+++ epa-setup.el	2008/02/07 02:56:02	1.2
@@ -1,3 +1,28 @@
+;;; epa-setup.el --- setup routine for the EasyPG Assistant.
+;; Copyright (C) 2006,2007,2008 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno at unixuser.org>
+;; Keywords: PGP, GnuPG
+
+;; This file is part of EasyPG.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
 (autoload 'epa-list-keys "epa")
 
 (autoload 'epa-dired-mode-hook "epa-dired")



1.2       +1 -1      XEmacs/packages/xemacs-packages/easypg/epa.el

Index: epa.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/epa.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- epa.el	2007/09/16 13:16:10	1.1
+++ epa.el	2008/02/07 02:56:03	1.2
@@ -13,7 +13,7 @@
 
 ;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License



1.2       +1 -1      XEmacs/packages/xemacs-packages/easypg/epg-config.el

Index: epg-config.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/epg-config.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- epg-config.el	2007/09/16 13:16:10	1.1
+++ epg-config.el	2008/02/07 02:56:03	1.2
@@ -13,7 +13,7 @@
 
 ;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License



1.2       +4 -1      XEmacs/packages/xemacs-packages/easypg/epg-package-info.el.in

Index: epg-package-info.el.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/epg-package-info.el.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- epg-package-info.el.in	2007/09/16 13:16:10	1.1
+++ epg-package-info.el.in	2008/02/07 02:56:03	1.2
@@ -13,7 +13,7 @@
 
 ;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
@@ -28,6 +28,9 @@
 
 (defconst epg-version-number "@VERSION@"
   "Version number of this package.")
+
+(defconst epg-bug-report-address "@PACKAGE_BUGREPORT@"
+  "Report bugs to this address.")
 
 (provide 'epg-package-info)
 



1.2       +4 -4      XEmacs/packages/xemacs-packages/easypg/epg.el

Index: epg.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/easypg/epg.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- epg.el	2007/09/16 13:16:11	1.1
+++ epg.el	2008/02/07 02:56:03	1.2
@@ -15,7 +15,7 @@
 
 ;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
@@ -330,7 +330,7 @@ This function is for internal use only."
 (defun epg-context-set-passphrase-callback (context passphrase-callback
 						    &optional handback)
   "Set the function used to query passphrase.
-If optional argument HANDBACK is specified, it is passed to CALLBACK."
+If optional argument HANDBACK is specified, it is passed to PASSPHRASE-CALLBACK."
   (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 7 (if handback
@@ -340,7 +340,7 @@ If optional argument HANDBACK is specifi
 (defun epg-context-set-progress-callback (context progress-callback
 						  &optional handback)
   "Set the function which handles progress update.
-If optional argument HANDBACK is specified, it is passed to CALLBACK."
+If optional argument HANDBACK is specified, it is passed to PROGRESS-CALLBACK."
   (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 8 (if handback
@@ -2477,7 +2477,7 @@ If you are unsure, use synchronous versi
 
 ;;;###autoload
 (defun epg-start-sign-keys (context keys &optional local)
-  "Initiate an sign keys operation.
+  "Initiate a sign keys operation.
 
 If you use this function, you will need to wait for the completion of
 `epg-gpg-program' by using `epg-wait-for-completion' and call





More information about the XEmacs-CVS mailing list