;;; 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.
(defconst epg-digest-algorithm-alist
'((1 . "MD5")
(2 . "SHA1")
- (3 . "RMD160")
+ (3 . "RIPEMD160")
(8 . "SHA256")
(9 . "SHA384")
(10 . "SHA512")
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)
(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))))
;; 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)
(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)
(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
(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)
(provide 'epg)
-;; arch-tag: de8f0acc-1bcf-4c14-a09e-bfffe1b579b7
;;; epg.el ends here