]> code.delx.au - gnu-emacs/blobdiff - lisp/epg.el
Merge: Minor changes for problems found by GCC 4.5.2's static checks.
[gnu-emacs] / lisp / epg.el
index 6e69ae09da4c7bfff6bffa41e1b6d48d463c3d86..c096ec6df98a5e921c330017025db4879c971cc8 100644 (file)
@@ -1,9 +1,9 @@
 ;;; epg.el --- the EasyPG Library
-;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc.
 
 ;; Author: Daiki Ueno <ueno@unixuser.org>
 ;; Keywords: PGP, GnuPG
+;; Version: 1.0.0
 
 ;; This file is part of GNU Emacs.
 
@@ -66,7 +66,7 @@
 (defconst epg-digest-algorithm-alist
   '((1 . "MD5")
     (2 . "SHA1")
-    (3 . "RMD160")
+    (3 . "RIPEMD160")
     (8 . "SHA256")
     (9 . "SHA384")
     (10 . "SHA512")
@@ -336,7 +336,13 @@ PASSPHRASE-CALLBACK is either a function, or a cons-cell whose
 car is a function and cdr is a callback data.
 
 The function gets three arguments: the context, the key-id in
-question, and the callback data (if any)."
+question, and the callback data (if any).
+
+The callback may not be called if you use GnuPG 2.x, which relies
+on the external program called `gpg-agent' for passphrase query.
+If you really want to intercept passphrase query, consider
+installing GnuPG 1.x _along with_ GnuPG 2.x, which does passphrase
+query by itself and Emacs can intercept them."
   (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 7 (if (consp passphrase-callback)
@@ -1555,14 +1561,14 @@ This function is for internal use only."
 
 (defun epg--status-KEYEXPIRED (context string)
   (epg-context-set-result-for
-   context 'error
+   context 'key
    (cons (list 'key-expired (cons 'expiration-time
                                  (epg--time-from-seconds string)))
         (epg-context-result-for context 'error))))
 
 (defun epg--status-KEYREVOKED (context string)
   (epg-context-set-result-for
-   context 'error
+   context 'key
    (cons '(key-revoked)
         (epg-context-result-for context 'error))))
 
@@ -1899,7 +1905,7 @@ You can then use `write-region' to write new data into the file."
          ;; Cleanup the tempfile.
          (and tempfile
               (file-exists-p tempfile)
-              (delete-file tempfile t))
+              (delete-file tempfile))
          ;; Cleanup the tempdir.
          (and tempdir
               (file-directory-p tempdir)
@@ -1999,7 +2005,7 @@ If PLAIN is nil, it returns the result as a string."
          (epg-read-output context))
       (epg-delete-output-file context)
       (if (file-exists-p input-file)
-         (delete-file input-file t))
+         (delete-file input-file))
       (epg-reset context))))
 
 (defun epg-start-verify (context signature &optional signed-text)
@@ -2203,7 +2209,7 @@ Otherwise, it makes a cleartext signature."
          (epg-read-output context))
       (epg-delete-output-file context)
       (if input-file
-         (delete-file input-file t))
+         (delete-file input-file))
       (epg-reset context))))
 
 (defun epg-start-encrypt (context plain recipients
@@ -2323,7 +2329,7 @@ If RECIPIENTS is nil, it performs symmetric encryption."
          (epg-read-output context))
       (epg-delete-output-file context)
       (if input-file
-         (delete-file input-file t))
+         (delete-file input-file))
       (epg-reset context))))
 
 (defun epg-start-export-keys (context keys)
@@ -2643,5 +2649,4 @@ Type names are resolved using `epg-dn-type-alist'."
 
 (provide 'epg)
 
-;; arch-tag: de8f0acc-1bcf-4c14-a09e-bfffe1b579b7
 ;;; epg.el ends here