Commits

Anonymous committed b1d7b72

2005-08-15 Simon Josefsson <jas@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@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@unixuser.org>

* pgg-parse.el (pgg-parse-hash-algorithm-alist): Add SHA-2.

2005-07-25 Simon Josefsson <jas@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@unixuser.org> and Luigi Panzeri <matley@muppetslab.org>.

2005-07-04 Juanma Barranquero <lekktu@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@jpl.org>

* pgg.el (pgg-verify): Return the verification result.

2005-05-30 Reiner Steib <Reiner.Steib@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@extundo.com>

* pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): Fix PIN caching,
tiny patch from "Georg C. F. Greve" <greve@gnu.org>.

2005-01-21 Derek Atkins <warlord@MIT.EDU> (tiny change)

* pgg-pgp.el (pgg-pgp-decrypt-region): Use passphrase cache.

Comments (0)

Files changed (7)

+2005-08-15  Simon Josefsson  <jas@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@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@unixuser.org>
+
+	* pgg-parse.el (pgg-parse-hash-algorithm-alist): Add SHA-2.
+
+2005-07-25  Simon Josefsson  <jas@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@unixuser.org> and Luigi Panzeri <matley@muppetslab.org>.
+
+2005-07-04  Juanma Barranquero  <lekktu@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@jpl.org>
+
+	* pgg.el (pgg-verify): Return the verification result.
+
+2005-05-30  Reiner Steib  <Reiner.Steib@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@extundo.com>
+
+	* pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): Fix PIN caching,
+	tiny patch from "Georg C. F. Greve" <greve@gnu.org>.
+
+2005-01-21  Derek Atkins <warlord@MIT.EDU>  (tiny change)
+
+	* pgg-pgp.el (pgg-pgp-decrypt-region): Use passphrase cache.
+
 2004-09-16  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.05 released.
 ;;; 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@unixuser.org>
 ;; Created: 1999/11/02
 
 ;; 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:
 
 ;;; 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@unixuser.org>
 ;; Created: 1999/10/28
 
 ;; 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:
 
   (require 'pgg))
 
 (defgroup pgg-gpg ()
-  "GnuPG interface"
+  "GnuPG interface."
   :group 'pgg)
 
 (defcustom pgg-gpg-program "gpg"
   (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)))
 
     (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"
 ;;; 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@unixuser.org>
 ;; Created: 1999/10/28
 
 ;; 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:
 
 (eval-when-compile (require 'cl))
 
 (defgroup pgg-parse ()
-  "OpenPGP packet parsing"
+  "OpenPGP packet parsing."
   :group 'pgg)
 
 (defcustom pgg-parse-public-key-algorithm-alist
 	  (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
   `(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)
 
 (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)
 
 (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)
 ;;; 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@unixuser.org>
 ;; Created: 1999/11/02
 
 ;; 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:
 
   (require 'pgg))
 
 (defgroup pgg-pgp ()
-  "PGP 2.* and 6.* interface"
+  "PGP 2.* and 6.* interface."
   :group 'pgg)
 
 (defcustom pgg-pgp-program "pgp"
 (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."
 ;;; 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@unixuser.org>
 ;; Created: 1999/11/02
 
 ;; 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:
 
   (require 'pgg))
 
 (defgroup pgg-pgp5 ()
-  "PGP 5.* interface"
+  "PGP 5.* interface."
   :group 'pgg)
 
 (defcustom pgg-pgp5-pgpe-program "pgpe"
 ;;; 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@unixuser.org>
 ;; Created: 1999/10/28
 
 ;; 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:
 
 ;; 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)))
 	(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 ()
 
 (defun pgg-insert-url-with-w3 (url)
   (ignore-errors
-    (require 'w3)
     (require 'url)
     (let (buffer-file-name)
       (url-insert-file-contents url))))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.