1. xemacs
  2. pgg

Commits

simon  committed 4f59341

2004-09-16 Simon Josefsson <jas@extundo.com>

* pgg-pgp.el, pgg-pgp5.el: Sync with Gnus CVS until and including
2003-07-24 entry below.

2004-07-28 Simon Josefsson <jas@extundo.com>

* pgg-pgp5.el (pgg-pgp5-encrypt-region): Accept sign
parameter (but don't use it, for now).

2004-05-19 Lars Magne Ingebrigtsen <larsi@gnus.org>

* pgg-pgp.el (pgg-pgp-verify-region): Clean up.

2004-05-19 Michael Schierl <schierlm-usenet@gmx.de>

* pgg-pgp.el (pgg-pgp-verify-region): Default when signature
isn't a string.

2003-07-28 Dave Love <fx@gnu.org>

* pgg-pgp.el, pgg-pgp5.el: Require cl when compiling.

2003-07-24 Jesper Harder <harder@ifa.au.dk>

* pgg-pgp.el, pgg-pgp5.el, pgg.el: Reapply changes from 2003-04-03
to fix security problem. See
http://www.debian.org/security/2003/dsa-339

  • Participants
  • Parent commits 4f2362c
  • Branches default

Comments (0)

Files changed (3)

File ChangeLog

View file
+2004-09-16  Simon Josefsson  <jas@extundo.com>
+
+	* pgg-pgp.el, pgg-pgp5.el: Sync with Gnus CVS until and including
+	2003-07-24 entry below.
+
+2004-07-28  Simon Josefsson  <jas@extundo.com>
+
+	* pgg-pgp5.el (pgg-pgp5-encrypt-region): Accept sign
+	parameter (but don't use it, for now).
+
+2004-05-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* pgg-pgp.el (pgg-pgp-verify-region): Clean up.
+
+2004-05-19  Michael Schierl  <schierlm-usenet@gmx.de>
+
+	* pgg-pgp.el (pgg-pgp-verify-region): Default when signature
+	isn't a string.
+
+2003-07-28  Dave Love  <fx@gnu.org>
+
+	* pgg-pgp.el, pgg-pgp5.el: Require cl when compiling.
+
+2003-07-24  Jesper Harder  <harder@ifa.au.dk>
+
+	* pgg-pgp.el, pgg-pgp5.el, pgg.el: Reapply changes from 2003-04-03
+	to fix security problem.  See
+	http://www.debian.org/security/2003/dsa-339
+
 2004-09-16  Simon Josefsson  <jas@extundo.com>
 
 	* pgg-parse.el: Sync with Gnus CVS until and including 2003-12-10

File pgg-pgp.el

View file
 
 ;;; Code:
 
-(eval-when-compile (require 'pgg))
+(eval-when-compile
+  (require 'cl)				; for pgg macros
+  (require 'pgg))
 
 (defgroup pgg-pgp ()
   "PGP 2.* and 6.* interface"
   "PGP ID of your default identity.")
 
 (defun pgg-pgp-process-region (start end passphrase program args)
-  (let* ((errors-file-name
-	  (expand-file-name (make-temp-name "pgg-errors")  
-			    pgg-temporary-file-directory))
+  (let* ((errors-file-name (pgg-make-temp-file "pgg-errors"))
 	 (args
 	  (append args
 		  pgg-pgp-extra-args
 
 (defun pgg-pgp-verify-region (start end &optional signature)
   "Verify region between START and END as the detached signature SIGNATURE."
-  (let* ((basename (expand-file-name "pgg" temporary-file-directory))
-	 (orig-file (make-temp-name basename))
+  (let* ((orig-file (pgg-make-temp-file "pgg"))
 	 (args '("+verbose=1" "+batchmode" "+language=us"))
 	 (orig-mode (default-file-modes)))
     (unwind-protect
 		jka-compr-compression-info-list jam-zcat-filename-list)
 	    (write-region start end orig-file)))
       (set-default-file-modes orig-mode))
-    (when (stringp signature)
-      (copy-file signature (setq signature (concat orig-file ".asc")))
-      (setq args (append args (list signature orig-file))))
+    (if (stringp signature)
+	(progn
+	  (copy-file signature (setq signature (concat orig-file ".asc")))
+	  (setq args (append args (list signature orig-file))))
+      (setq args (append args (list orig-file))))
     (pgg-pgp-process-region (point)(point) nil pgg-pgp-program args)
     (delete-file orig-file)
     (if signature (delete-file signature))
 (defun pgg-pgp-snarf-keys-region (start end)
   "Add all public keys in region between START and END to the keyring."
   (let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
-	 (basename (expand-file-name "pgg" temporary-file-directory))
-	 (key-file (make-temp-name basename))
+	 (key-file (pgg-make-temp-file "pgg"))
 	 (args
 	  (list "+verbose=1" "+batchmode" "+language=us" "-kaf"
 		key-file)))
 
 (provide 'pgg-pgp)
 
+;;; arch-tag: 076b7801-37b2-49a6-97c3-218fdecde33c
 ;;; pgg-pgp.el ends here

File pgg-pgp5.el

View file
 ;;; pgg-pgp5.el --- PGP 5.* support for PGG.
 
-;; Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
 
 ;; Author: Daiki Ueno <ueno@unixuser.org>
 ;; Created: 1999/11/02
 
 ;;; Code:
 
-(eval-when-compile (require 'pgg))
+(eval-when-compile
+  (require 'cl)				; for pgg macros
+  (require 'pgg))
 
 (defgroup pgg-pgp5 ()
   "PGP 5.* interface"
   "PGP 5.* ID of your default identity.")
 
 (defun pgg-pgp5-process-region (start end passphrase program args)
-  (let* ((errors-file-name
-	  (expand-file-name (make-temp-name "pgg-errors")  
-			    pgg-temporary-file-directory))
+  (let* ((errors-file-name (pgg-make-temp-file "pgg-errors"))
 	 (args
 	  (append args
 		  pgg-pgp5-extra-args
 		 (buffer-substring (match-end 0)(progn (end-of-line)(point)))))
 	 2)))))
 
-(defun pgg-pgp5-encrypt-region (start end recipients)
+(defun pgg-pgp5-encrypt-region (start end recipients &optional sign)
   "Encrypt the current region between START and END."
   (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id))
 	 (args
 
 (defun pgg-pgp5-verify-region (start end &optional signature)
   "Verify region between START and END as the detached signature SIGNATURE."
-  (let* ((basename (expand-file-name "pgg" pgg-temporary-file-directory))
-	 (orig-file (make-temp-name basename))
-	 (args '("+verbose=1" "+batchmode=1" "+language=us"))
-	 (orig-mode (default-file-modes)))
+  (let ((orig-file (pgg-make-temp-file "pgg"))
+	(args '("+verbose=1" "+batchmode=1" "+language=us"))
+	(orig-mode (default-file-modes)))
     (unwind-protect
 	(progn
 	  (set-default-file-modes 448)
 (defun pgg-pgp5-snarf-keys-region (start end)
   "Add all public keys in region between START and END to the keyring."
   (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id))
-	 (basename (expand-file-name "pgg" pgg-temporary-file-directory))
-	 (key-file (make-temp-name basename))
+	 (key-file (pgg-make-temp-file "pgg"))
 	 (args
 	  (list "+verbose=1" "+batchmode=1" "+language=us" "-a"
 		key-file)))
 
 (provide 'pgg-pgp5)
 
+;;; arch-tag: 3dbd1073-6b3a-466c-9f55-5c587ffa6d7b
 ;;; pgg-pgp5.el ends here