More syncing.
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pgg/ChangeLog,v
retrieving revision 1.24
diff -u -p -r1.24 ChangeLog
--- ChangeLog 16 Sep 2004 13:57:38 -0000 1.24
+++ ChangeLog 23 Sep 2005 12:50:48 -0000
@@ -1,3 +1,55 @@
+2005-08-15 Simon Josefsson <jas(a)extundo.com>
+
+ * pgg.el (url-insert-file-contents): Don't autoload it, Emacs has
+ it in url-handlers.el and XEmacs in url.el. Reported by Luca
+ Capello and Romain Francoise.
+ (pgg-fetch-key-function): Removed, not used?
+ (pgg-insert-url-with-w3): Require url, to get
+ url-insert-file-contents regardless of where it is defined.
+
+2005-08-08 Simon Josefsson <jas(a)extundo.com>
+
+ * pgg.el: Autoload url-insert-file-contents instead of loading
+ w3/url.
+ (pgg-insert-url-with-w3): Don't load url here.
+
+2005-08-05 Daiki Ueno <ueno(a)unixuser.org>
+
+ * pgg-parse.el (pgg-parse-hash-algorithm-alist): Add SHA-2.
+
+2005-07-25 Simon Josefsson <jas(a)extundo.com>
+
+ * pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible
+ to have the url package without w3. Reported by Daiki Ueno
+ <ueno(a)unixuser.org> and Luigi Panzeri <matley(a)muppetslab.org>.
+
+2005-07-04 Juanma Barranquero <lekktu(a)gmail.com>
+
+ * pgg-gpg.el (pgg-gpg):
+ * pgg-parse.el (pgg-parse):
+ * pgg-pgp.el (pgg-pgp):
+ * pgg-pgp5.el (pgg-pgp5): Finish `defgroup' description with period.
+
+2005-06-29 Katsumi Yamaoka <yamaoka(a)jpl.org>
+
+ * pgg.el (pgg-verify): Return the verification result.
+
+2005-05-30 Reiner Steib <Reiner.Steib(a)gmx.de>
+
+ * pgg-gpg.el (pgg-gpg-snarf-keys-region): Replace `string-to-int'
+ by `string-to-number'.
+ * pgg-parse.el (pgg-read-body, pgg-read-bytes)
+ (pgg-format-key-identifier): Ditto.
+
+2005-05-09 Simon Josefsson <jas(a)extundo.com>
+
+ * pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): Fix PIN caching,
+ tiny patch from "Georg C. F. Greve" <greve(a)gnu.org>.
+
+2005-01-21 Derek Atkins <warlord(a)MIT.EDU> (tiny change)
+
+ * pgg-pgp.el (pgg-pgp-decrypt-region): Use passphrase cache.
+
2004-09-16 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.05 released.
Index: pgg-def.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pgg/pgg-def.el,v
retrieving revision 1.4
diff -u -p -r1.4 pgg-def.el
--- pgg-def.el 16 Sep 2004 12:02:15 -0000 1.4
+++ pgg-def.el 23 Sep 2005 12:50:48 -0000
@@ -1,6 +1,6 @@
;;; pgg-def.el --- functions/macros for defining PGG functions
-;; Copyright (C) 1999, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno(a)unixuser.org>
;; Created: 1999/11/02
@@ -20,8 +20,8 @@
;; 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., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Code:
Index: pgg-gpg.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pgg/pgg-gpg.el,v
retrieving revision 1.6
diff -u -p -r1.6 pgg-gpg.el
--- pgg-gpg.el 16 Sep 2004 12:34:06 -0000 1.6
+++ pgg-gpg.el 23 Sep 2005 12:50:49 -0000
@@ -1,6 +1,7 @@
;;; pgg-gpg.el --- GnuPG support for PGG.
-;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno(a)unixuser.org>
;; Created: 1999/10/28
@@ -20,8 +21,8 @@
;; 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., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Code:
@@ -30,7 +31,7 @@
(require 'pgg))
(defgroup pgg-gpg ()
- "GnuPG interface"
+ "GnuPG interface."
:group 'pgg)
(defcustom pgg-gpg-program "gpg"
@@ -99,13 +100,13 @@
(if (and pgg-cache-passphrase
(progn
(goto-char (point-min))
- (re-search-forward "^\\[GNUPG:] GOOD_PASSPHRASE\\>" nil t)))
+ (re-search-forward "^\\[GNUPG:] \\(GOOD_PASSPHRASE\\>\\)\\|\\(SIG_CREATED\\)" nil t)))
(pgg-add-passphrase-cache
(or key
(progn
(goto-char (point-min))
(if (re-search-forward
- "^\\[GNUPG:] NEED_PASSPHRASE \\w+ ?\\w*" nil t)
+ "^\\[GNUPG:] NEED_PASSPHRASE\\(_PIN\\)? \\w+ ?\\w*" nil t)
(substring (match-string 0) -8))))
passphrase)))
@@ -252,7 +253,7 @@ If optional argument SIGN is non-nil, do
(when (re-search-forward "^\\[GNUPG:] IMPORT_RES\\>" nil t)
(setq status (buffer-substring (match-end 0)
(progn (end-of-line)(point)))
- status (vconcat (mapcar #'string-to-int (split-string status))))
+ status (vconcat (mapcar #'string-to-number (split-string status))))
(erase-buffer)
(insert (format "Imported %d key(s).
\tArmor contains %d key(s) [%d bad, %d old].\n"
Index: pgg-parse.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pgg/pgg-parse.el,v
retrieving revision 1.4
diff -u -p -r1.4 pgg-parse.el
--- pgg-parse.el 16 Sep 2004 12:37:05 -0000 1.4
+++ pgg-parse.el 23 Sep 2005 12:50:49 -0000
@@ -1,6 +1,6 @@
;;; pgg-parse.el --- OpenPGP packet parsing
-;; Copyright (C) 1999, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno(a)unixuser.org>
;; Created: 1999/10/28
@@ -20,8 +20,8 @@
;; 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., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
@@ -38,7 +38,7 @@
(eval-when-compile (require 'cl))
(defgroup pgg-parse ()
- "OpenPGP packet parsing"
+ "OpenPGP packet parsing."
:group 'pgg)
(defcustom pgg-parse-public-key-algorithm-alist
@@ -56,7 +56,8 @@
(cons (sexp :tag "Number") (sexp :tag "Type"))))
(defcustom pgg-parse-hash-algorithm-alist
- '((1 . MD5) (2 . SHA1) (3 . RIPEMD160) (5 . MD2))
+ '((1 . MD5) (2 . SHA1) (3 . RIPEMD160) (5 . MD2) (8 . SHA256) (9 . SHA384)
+ (10 . SHA512))
"Alist of the assigned number to the cryptographic hash algorithm."
:group 'pgg-parse
:type '(repeat
@@ -111,7 +112,7 @@
`(mapconcat (lambda (c) (format "%02X" (pgg-char-int c)))
,string "")
;; `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x"
- ;; (string-to-int-list ,string)))
+ ;; (string-to-number-list ,string)))
)
(defmacro pgg-parse-time-field (bytes)
@@ -134,7 +135,7 @@
(defmacro pgg-read-bytes (nbytes)
`(mapcar #'pgg-char-int (pgg-read-bytes-string ,nbytes))
- ;; `(string-to-int-list (pgg-read-bytes-string ,nbytes))
+ ;; `(string-to-number-list (pgg-read-bytes-string ,nbytes))
)
(defmacro pgg-read-body-string (ptag)
@@ -144,7 +145,7 @@
(defmacro pgg-read-body (ptag)
`(mapcar #'pgg-char-int (pgg-read-body-string ,ptag))
- ;; `(string-to-int-list (pgg-read-body-string ,ptag))
+ ;; `(string-to-number-list (pgg-read-body-string ,ptag))
)
(defalias 'pgg-skip-bytes 'forward-char)
Index: pgg-pgp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pgg/pgg-pgp.el,v
retrieving revision 1.5
diff -u -p -r1.5 pgg-pgp.el
--- pgg-pgp.el 16 Sep 2004 12:41:11 -0000 1.5
+++ pgg-pgp.el 23 Sep 2005 12:50:49 -0000
@@ -1,6 +1,7 @@
;;; pgg-pgp.el --- PGP 2.* and 6.* support for PGG.
-;; Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno(a)unixuser.org>
;; Created: 1999/11/02
@@ -20,8 +21,8 @@
;; 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., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Code:
@@ -30,7 +31,7 @@
(require 'pgg))
(defgroup pgg-pgp ()
- "PGP 2.* and 6.* interface"
+ "PGP 2.* and 6.* interface."
:group 'pgg)
(defcustom pgg-pgp-program "pgp"
@@ -148,14 +149,16 @@ Bourne shell or its equivalent \(not tcs
(defun pgg-pgp-decrypt-region (start end)
"Decrypt the current region between START and END."
(let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
+ (key (pgg-pgp-lookup-key pgg-pgp-user-id 'encrypt))
(passphrase
(pgg-read-passphrase
- (format "PGP passphrase for %s: " pgg-pgp-user-id)
- (pgg-pgp-lookup-key pgg-pgp-user-id 'encrypt)))
+ (format "PGP passphrase for %s: " pgg-pgp-user-id) key))
(args
'("+verbose=1" "+batchmode" "+language=us" "-f")))
(pgg-pgp-process-region start end passphrase pgg-pgp-program args)
- (pgg-process-when-success nil)))
+ (pgg-process-when-success
+ (if pgg-cache-passphrase
+ (pgg-add-passphrase-cache key passphrase)))))
(defun pgg-pgp-sign-region (start end &optional clearsign)
"Make detached signature from text between START and END."
Index: pgg-pgp5.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pgg/pgg-pgp5.el,v
retrieving revision 1.4
diff -u -p -r1.4 pgg-pgp5.el
--- pgg-pgp5.el 16 Sep 2004 12:41:11 -0000 1.4
+++ pgg-pgp5.el 23 Sep 2005 12:50:49 -0000
@@ -1,6 +1,7 @@
;;; pgg-pgp5.el --- PGP 5.* support for PGG.
-;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno(a)unixuser.org>
;; Created: 1999/11/02
@@ -20,8 +21,8 @@
;; 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., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Code:
@@ -30,7 +31,7 @@
(require 'pgg))
(defgroup pgg-pgp5 ()
- "PGP 5.* interface"
+ "PGP 5.* interface."
:group 'pgg)
(defcustom pgg-pgp5-pgpe-program "pgpe"
Index: pgg.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pgg/pgg.el,v
retrieving revision 1.4
diff -u -p -r1.4 pgg.el
--- pgg.el 16 Sep 2004 12:45:39 -0000 1.4
+++ pgg.el 23 Sep 2005 12:50:49 -0000
@@ -1,6 +1,7 @@
;;; pgg.el --- glue for the various PGP implementations.
-;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno(a)unixuser.org>
;; Created: 1999/10/28
@@ -20,8 +21,8 @@
;; 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., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
@@ -34,20 +35,10 @@
;; Don't merge these two `eval-when-compile's.
(eval-when-compile
(require 'cl))
-;; Fixme: This would be better done with an autoload for
-;; `url-insert-file-contents', and the url stuff rationalized.
-;; (`locate-library' can say whether the url code is available.)
-(eval-when-compile
- (ignore-errors
- (require 'w3)
- (require 'url)))
;;; @ utility functions
;;;
-(defvar pgg-fetch-key-function (if (fboundp 'url-insert-file-contents)
- (function pgg-fetch-key-with-w3)))
-
(defun pgg-invoke (func scheme &rest args)
(progn
(require (intern (format "pgg-%s" scheme)))
@@ -298,7 +289,8 @@ within the region."
(with-output-to-temp-buffer pgg-echo-buffer
(set-buffer standard-output)
(insert-buffer-substring (if status pgg-output-buffer
- pgg-errors-buffer)))))))
+ pgg-errors-buffer)))))
+ status))
;;;###autoload
(defun pgg-insert-key ()
@@ -327,7 +319,6 @@ within the region."
(defun pgg-insert-url-with-w3 (url)
(ignore-errors
- (require 'w3)
(require 'url)
(let (buffer-file-name)
(url-insert-file-contents url))))