Home GnuPG
Diffusion GPGME 4100794e305b

python: stop raising BadSignatures from decrypt(verify=True)

Description

python: stop raising BadSignatures from decrypt(verify=True)

* src/core.py (decrypt): filter out signatures with errors from the
returned verify_result, but avoid raising BadSignatures
* tests/t-decrypt-verify.py: ensure that only a single signature is
returned when evaluating cipher-3.asc, since the other signature is
unknown.

This change preserves the invariant that decrypt() only ever returns
valid signatures in the verify_result, but it avoids unnecessary
errors in the face of the presence of an additional bad signature.

  • GnuPG-bug-id: T4276
  • Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

Details

Provenance
dkgAuthored on May 3 2019, 5:28 AM
Parents
rMbd2d282e572b: python/tests: try to decrypt and verify new test data
Branches
Unknown
Tags
Unknown
References
dkg/fix-T4276
Tasks
T4276: Context.decrypt() throws an error if *any* signature is bad