#3881: GPGME returns success even if it fails to invoke gpg2
---------------------+----------------------
  Reporter:  tamo    |      Owner:  mutt-dev
      Type:  defect  |     Status:  new
  Priority:  major   |  Milestone:
 Component:  crypto  |    Version:  1.7.0
Resolution:          |   Keywords:  gpgme
---------------------+----------------------

Comment (by kevin8t8):

 I've duplicated your example, and looked at the other callers.  They all
 happen to check verify_result->signatures before doing any signature
 processing.

 I like your patch suggestion, but I've instead added a check for
 {{{(verify_result && verify_result->signatures)}}} just to make it a bit
 more explicit.

 The for loop just below will actually infinite-loop if verify_result is
 NULL, so that's another good reason to add it outside the call.
 (verify_result shouldn't be NULL if gpgme_op_verify() returns success, but
 still...).

 The end result is still a bit strange, with an empty
 {{{
 [-- Begin signature information --]
 [-- End signature information --]
 }}}
 block, but at least the status shows "PGP signature could NOT be
 verified.".

--
Ticket URL: <https://dev.mutt.org/trac/ticket/3881#comment:3>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to