(match-string 2 string)))
             (epg-context-result-for epg-context 'verify)))))
 
+(defun epg-status-ERRSIG (process string)
+  (if (string-match "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \
+\\([0-9A-Fa-f][0-9A-Fa-f]\\) \\([^ ]+\\) \\([0-9]+\\)"
+                   string)
+      (epg-context-set-result-for
+       epg-context
+       'verify
+       (cons (list (cons 'key-id (match-string 1 string))
+                        (cons 'pubkey-algorithm
+                              (string-to-number (match-string 2 string)))
+                        (cons 'digest-algorithm
+                              (string-to-number (match-string 3 string)))
+                        (cons 'class
+                              (string-to-number (match-string 4 string)))
+                        (cons 'creation-time (match-string 5 string))
+                        (cons 'rc (string-to-number (match-string 6 string))))
+            (epg-context-result-for epg-context 'error)))))
+
 (defun epg-status-VALIDSIG (process string)
   (let ((signature (car (epg-context-result-for epg-context 'verify))))
     (if (and signature
             (eq (epg-signature-status signature) 'good))
        (epg-signature-set-validity signature 'ultimate))))
 
-(defun epg-status-NO_PUBKEY (process string)
-  (epg-context-set-result-for
-   epg-context 'error
-   (cons (cons 'no-pubkey string)
-        (epg-context-result-for epg-context 'error))))
-
-(defun epg-status-NO_SECKEY (process string)
-  (epg-context-set-result-for
-   epg-context 'error
-   (cons (cons 'no-seckey string)
-        (epg-context-result-for epg-context 'error))))
-
 (defun epg-status-PROGRESS (process string)
   (if (string-match "\\`\\([^ ]+\\) \\([^ ]\\) \\([0-9]+\\) \\([0-9]+\\)"
                    string)
          (epg-start-verify context
                            (epg-make-data-from-file signature)))
        (epg-wait-for-completion context)
+       (if (epg-context-result-for context 'error)
+           (error "Verify failed: %S"
+                  (epg-context-result-for context 'error)))
        (unless plain
          (epg-read-output context)))
     (unless plain
            (epg-start-verify context (epg-make-data-from-string signature)))
          (epg-flush context)
          (epg-wait-for-completion context)
+         (if (epg-context-result-for context 'error)
+             (error "Verify failed: %S"
+                    (epg-context-result-for context 'error)))
          (epg-read-output context))
       (epg-delete-output-file context)
       (if (and input-file