<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/lang/python/src, branch dkg/fix-T4276</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=dkg%2Ffix-T4276</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=dkg%2Ffix-T4276'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2019-05-03T03:28:11Z</updated>
<entry>
<title>python: stop raising BadSignatures from decrypt(verify=True)</title>
<updated>2019-05-03T03:28:11Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2019-05-03T03:28:11Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=4100794e305ba22241ea5a4f7b42bb5189fbd948'/>
<id>urn:sha1:4100794e305ba22241ea5a4f7b42bb5189fbd948</id>
<content type='text'>
* 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: 4276
Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>python: overhaul logic of Context.decrypt()</title>
<updated>2018-12-05T10:46:10Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-12-04T17:44:35Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=65c28da4e49a8778607fdcf6f51a840166616d9f'/>
<id>urn:sha1:65c28da4e49a8778607fdcf6f51a840166616d9f</id>
<content type='text'>
* lang/python/src/core.py (Context.decrypt): simplify and clarify the
logic behind handling verify=False.
* lang/python/tests/t-decrypt.py: ensure that we test verify=False

--

The function-internal variables were pretty unclear to the reader, and
the logic caused pretty nasty breakage when verify=False.

GnuPG-Bug-Id: 4271
Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>python: ctx.decrypt() has problematic error handling</title>
<updated>2018-12-05T10:46:09Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-12-04T17:29:40Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=878a0ad01265dba5b06429276bdcc5c21fedb6f5'/>
<id>urn:sha1:878a0ad01265dba5b06429276bdcc5c21fedb6f5</id>
<content type='text'>
* lang/python/src/core.py (Context.decrypt): document odd
error-handling behavior as a potential problem to be addressed.

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>python: Clarify the meaning of ctx.decrypt(verify=[])</title>
<updated>2018-12-05T10:46:09Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-12-04T17:27:15Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=5d8b4f74891af22379899ccee9e8ee849144eee3'/>
<id>urn:sha1:5d8b4f74891af22379899ccee9e8ee849144eee3</id>
<content type='text'>
* lang/python/src/core.py (Context.decrypt): docstring clarification
of what it means to pass an empty list to the verify argument.

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>python: gpg.Context.decrypt verify_sigs and sink_result are bools</title>
<updated>2018-12-05T10:46:09Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-11-28T06:51:24Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=b8fa76a30c02afc3d7f6aad0a59bb613d1b711fc'/>
<id>urn:sha1:b8fa76a30c02afc3d7f6aad0a59bb613d1b711fc</id>
<content type='text'>
Both of these function-internal variables are never used for anything
other than a binary state.  Implement them as the booleans they are.
Otherwise, casual readers of the code might think that they're
supposed to represent something other than a flag (e.g. "verify_sigs"
could mean "the signatures to verify", and "sink_result" could mean
"the place where we sink the result").

Signed-Off-By: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>python: clarify documentation for verify argument for Context.decrypt()</title>
<updated>2018-12-05T10:46:09Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-11-28T06:47:20Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=49af6d76e55f348c7b3cece756d6ac643d17ee68'/>
<id>urn:sha1:49af6d76e55f348c7b3cece756d6ac643d17ee68</id>
<content type='text'>
It's easy to miss that verify can take a list of keys.  Make it more
obvious to the average python dev who reads docstrings.

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>python: simplify Context.decrypt()</title>
<updated>2018-12-05T10:46:09Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-11-28T06:22:13Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=2491e6f92f5b562cbd6f7f931df630cb106f6688'/>
<id>urn:sha1:2491e6f92f5b562cbd6f7f931df630cb106f6688</id>
<content type='text'>
In the course of trying to address https://dev.gnupg.org/T4271, i
discovered that gpg.Context.decrypt() has a bit of superfluous code.
This changeset is intended to simplify the code without making any
functional changes.

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>python: import type</title>
<updated>2018-11-19T10:38:50Z</updated>
<author>
<name>Ben McGinnes</name>
<email>ben@adversary.org</email>
</author>
<published>2018-11-19T10:38:50Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=fd34415bdd57332424bd5a98d279e2331678a2fb'/>
<id>urn:sha1:fd34415bdd57332424bd5a98d279e2331678a2fb</id>
<content type='text'>
* Fixed bug T4242 and tested that dropping "Import" in favour of
  "import_type" does indeed work just fine.

Tested-by: Ben McGinnes &lt;ben@adversary.org&gt;
Signed-off-by: Ben McGinnes &lt;ben@adversary.org&gt;
</content>
</entry>
<entry>
<title>python: import constant</title>
<updated>2018-11-19T10:19:42Z</updated>
<author>
<name>Ben McGinnes</name>
<email>ben@adversary.org</email>
</author>
<published>2018-11-19T10:19:42Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=f773ad392da57e6be4ade93c44baa5d2057c40b6'/>
<id>urn:sha1:f773ad392da57e6be4ade93c44baa5d2057c40b6</id>
<content type='text'>
* lang/python/src/constants/__init__.py: dropped use of Import
  capitalisation and renamed lang/python/src/constants/import.py to
  lang/python/src/constants/import_type.py to address bug T4242.
* lang/python/doc/src/gpgme-python-howto: minor docs updates.
</content>
</entry>
<entry>
<title>Python: docs tweaks</title>
<updated>2018-10-21T18:43:36Z</updated>
<author>
<name>Ben McGinnes</name>
<email>ben@adversary.org</email>
</author>
<published>2018-10-21T18:43:36Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=59e38e3d2c14b40045e15c45b6c2f300e8f097dc'/>
<id>urn:sha1:59e38e3d2c14b40045e15c45b6c2f300e8f097dc</id>
<content type='text'>
* Fixed a minor error in how the reST version of the HOWTO is
  generated.
* Updated the help() in __init__.py with a little more detail as to
  why not to use the lower level functions.
</content>
</entry>
</feed>
