X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/2846c6e3607995ce250435e5998ea6a08f60dd89..de22b81de3405aeb7b341b80531e5627ee2a1277:/lisp/epg.el diff --git a/lisp/epg.el b/lisp/epg.el index 7ad0d34b4b..3c80ef9db7 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -1,6 +1,6 @@ ;;; epg.el --- the EasyPG Library ;; Copyright (C) 1999, 2000, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ;; Author: Daiki Ueno ;; Keywords: PGP, GnuPG @@ -1168,12 +1168,15 @@ This function is for internal use only." (setq epg-pending-status-list status-list) (while (and (eq (process-status (epg-context-process context)) 'run) epg-pending-status-list) - (accept-process-output (epg-context-process context) 1)))) + (accept-process-output (epg-context-process context) 1)) + (if epg-pending-status-list + (epg-context-set-result-for context 'error 'exit)))) (defun epg-wait-for-completion (context) "Wait until the `epg-gpg-program' process completes." (while (eq (process-status (epg-context-process context)) 'run) - (accept-process-output (epg-context-process context) 1))) + (accept-process-output (epg-context-process context) 1)) + (sleep-for 0.1)) (defun epg-reset (context) "Reset the CONTEXT." @@ -2013,8 +2016,12 @@ If you are unsure, use synchronous version of this function (process-send-eof (epg-context-process context)))) ;; Normal (or cleartext) signature. (if (epg-data-file signature) - (epg--start context (list "--" (epg-data-file signature))) - (epg--start context '("-")) + (epg--start context (if (eq (epg-context-protocol context) 'CMS) + (list "--verify" "--" (epg-data-file signature)) + (list "--" (epg-data-file signature)))) + (epg--start context (if (eq (epg-context-protocol context) 'CMS) + '("--verify" "-") + '("-"))) (if (eq (process-status (epg-context-process context)) 'run) (process-send-string (epg-context-process context) (epg-data-string signature)))