aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python (follow)
Commit message (Collapse)AuthorAgeFilesLines
* python: Allow returning signatures made by unknown keys in `decrypt`Jasper Spaans2021-06-241-3/+9
| | | | | | | | | | -- This functionality got dropped somewhere after 1.12, as part of the cleanup of the `Context.decrypt` call signature. Reintroduce it again, now using an explicit keyword argument `filter_signatures` (which defaults to hiding signatures by unknown keys). GnuPG-bug-id: 5292
* python: Fix key_export*.NIIBE Yutaka2020-12-031-3/+3
| | | | | | | | | | | * lang/python/src/core.py (key_export): Just raise an error. (key_export_minimal, key_export_secret): Ditto. -- GnuPG-bug-id: 5149 Fixes-commit: 7faef33d13fa8efce152ca7aa6e9d39030c1cf08 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Fix a test for newer GnuPG (>= 2.3).NIIBE Yutaka2020-11-121-1/+2
| | | | | | | | | | | * lang/python/tests/t-quick-subkey-creation.py: Specify RSA. -- Using GnuPG 2.3, a key with default (ed25519/cv25519) cannot have some combination of capabilities (e.g., "encr auth"). Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Handle the when case __doc__ is None.NIIBE Yutaka2020-10-271-1/+6
| | | | | | | | | * lang/python/src/core.py (GpgmeWrapper): Check if None. -- GnuPG-bug-id: 5075 Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Deprecate the non-working trustlist functions.Werner Koch2020-07-152-47/+0
| | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in: Clarify that the trustlist function should not be used. * src/engine.c (_gpgme_engine_op_trustlist): Always return an error. * src/engine-backend.h (struct engine_ops): Remove trustlist member. * src/engine-gpg.c (gpg_trustlist): Remove. (struct engine_ops): Remove that member. Also in all other engines. * tests/gpg/t-trustlist.c: Remove. * lang/python/tests/t-trustlist.py: Remove. -- This never worked in reality because the required feature has been removed from GnuPG version 1.3.2 soon after introduction of this feature in gpgme - 17 years ago. It was anyway marked as experimental. We keep the API and ABI, though. GnuPG-bug-id: 4834 Signed-off-by: Werner Koch <[email protected]>
* python: Workaround for a regression in GnuPG 2.2.21Werner Koch2020-07-142-2/+16
| | | | | | | | | * lang/python/tests/support.py (is_gpg_version): New. * lang/python/tests/t-encrypt-sym.py: Add workaround. -- GnuPG-bug-id: 4991 Signed-off-by: Werner Koch <[email protected]>
* python: fix minor typo in howtoBernhard Reiter2020-03-031-1/+1
|
* python: Also detect python 3.9.Werner Koch2020-02-141-2/+2
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* python: Fix how to generate documentation.NIIBE Yutaka2019-11-061-46/+35
| | | | | | | | * lang/python/doc/Makefile.am: Explicitly write rules to generate rst and texinfo files. Fixes-commit: 36428d8cf153a33faac6a951752cdc76e23f9737 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: doc: Remove generated files, put rules in Makefile.NIIBE Yutaka2019-07-1213-8017/+39
| | | | | | | | | | | * lang/python/doc/Makefile.am (EXTRA_DIST): Remove files not distributed like files under meta. * Add rules to generate .rst and .texi files. * lang/python/doc/rst: Remove .rst files to be generated. * lang/python/doc/texinfo: Remove .texi files to be generated. GnuPG-bug-id: 4275 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: doc: Add suffix for org files.NIIBE Yutaka2019-07-126-0/+0
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Fix regression in t-decrypt-verify test.Werner Koch2019-06-131-11/+11
| | | | | | | | * lang/python/tests/t-decrypt-verify.py: Comment recent changes. -- Fixes-commit: bd2d282e572b5d02669238c9e087259b85638477 GnuPG-bug-id: 4276
* python: Set a default-key into gpg.conf for the tests.Werner Koch2019-06-131-2/+1
| | | | | | | | | | | | | | | | | | | | * lang/python/tests/Makefile.am (gpg.conf): Set a default key. -- It seems we need to set a default key because at least t-sign.py does not specify the key to use and we do not want to rely on the order of keys in the keyring. Also Fixes-commit: f3ca2c9ce9fd4a03e293065f10b92589a7e642d6 gpg 2.0 is end-of-life and we don't need these extra options anymore. In fact they for the use of some gpg version and don't use the version gpgconf knows about. This also aligns the python tests to what we use for the C test suite. Signed-off-by: Werner Koch <[email protected]>
* python: Fix typo in DecryptionError exception.NIIBE Yutaka2019-06-041-3/+3
| | | | | | | | | | | | * lang/python/src/errors.py (DecryptionError): Rename from DeryptionError. (UnsupportedAlgorithm): Use DecryptionError. -- GnuPG-bug-id: 4478 Reported-by: Jan Girlich Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Make EXTRA_DIST files explicitAndre Heinecke2019-05-064-5/+171
| | | | | | | | | | | | | | | * configure.ac: Configure new Makefiles. * lang/python/Makefile.am: Remove dirs from extra dist and use subdirs. * lang/python/examples/Makefile.am, lang/python/src/Makefile.am, lang/python/doc/Makefile.am: New. Files that list EXTRA_DIST files. -- This is similar to what lang/js does by explicitly listing the files. This ensures that we have clean distribution tarballs without accidentall additions that just lay in the directory. GnuPG-Bug-Id: T4481
* Python, doc: Minor style improvementAndre Heinecke2019-05-061-8/+9
| | | | | * lang/python/src/core.py (Context): Retab and shorten max line length.
* python: stop raising BadSignatures from decrypt(verify=True)dkg/fix-T4276Daniel Kahn Gillmor2019-05-032-13/+10
| | | | | | | | | | | | | | | | | * 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 <[email protected]>
* python/tests: try to decrypt and verify new test dataDaniel Kahn Gillmor2019-05-032-0/+21
| | | | | | | | | | | | | | | * lang/python/tests/t-decrypt.py: test decryption of cipher-3.asc and cipher-no-sig.asc * lang/python/tests/t-decrypt-verify.py: test decryption and verification of cipher-3.asc and cipher-no-sig.asc -- note that this introduces a failed test -- decrypt-verify.py misbehaves on cipher-3.asc by throwing a BadSignature even though GnuPG-bug-id: 4276 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* python: make it easier to run a limited number of testsDaniel Kahn Gillmor2019-05-031-1/+1
| | | | | | | | | | | | | | | | * lang/python/tests/Makefile.am: prefer py_tests from the environment if present. -- I'm trying to make it nicer/quicker to hack on the testsuite for python bindings. With this change, if you're improving the python bindings test suite, you can selectively run only a few specific tests like so: lang/python$ make check py_tests='t-decrypt.py t-decrypt-verify.py' Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Release GPGME 1.13.0gpgme-1.13.0Werner Koch2019-03-261-1/+1
| | | | | | | | | * configure.ac: Bump LT versions. For C to C33/A22/R0. For C++ to C15/A9/R0. For Qt to C10/A3/R3. Signed-off-by: Werner Koch <[email protected]>
* python: examplesBen McGinnes2019-02-101-0/+131
| | | | | | | | | | * A rather obvious variant of the existing key import examples, except directed at Mailvelope's keyserver. * Yeah, Werner, I know ... but it exists because I used it and there's no harm in sharing. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: docsBen McGinnes2019-01-303-6/+6
| | | | | | | * Version bump in preparation for whenever GPGME 1.13.0 happens. * Ran the post_installer.py for docs preparation again. Signed-off-by: Ben McGinnes <[email protected]>
* python: post installer scriptBen McGinnes2019-01-271-0/+4
| | | | | | | * Removed auto-generated .texi files from doc/src/ so only the corrected versions are left. * Which means now it is complete, but with the initial work to expand it with info file generation later.
* python: post installer docs fix scriptBen McGinnes2019-01-2710-15/+53
| | | | | | | | | | | * Moved post_installer.py into the examples/howto/ directory. * Added instructions for its use to the Python Bindings HOWTO. * Ran it as intended from the lang/python/ directory in order to both prove it works and quickly and easily get the updated howto replicated. Also to fix all those .texi files. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: post installer doc fix scriptBen McGinnes2019-01-021-20/+9
| | | | | | | * Got rid of the bash bit in the comments. * Made the final printed instructions far more obvious. Signed-off-by: Ben McGinnes <[email protected]>
* python: examplesBen McGinnes2019-01-024-6/+3
| | | | | | | | | * Fixed inter-edit.py so it will actually work now. * made 3 others executable. * Fixed the semantics of assuan.py's instructions. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: docs processingBen McGinnes2018-12-242-6/+175
| | | | | | | | | | | | | | | * Added some EPUB specific config options to the Sphinx config file which might help reduce some of Sphinx's more stupid default errors with EPUB validation. * Added lang/python/post_installer.py script for automating the generation of .texi and .rst "source" files from the real source files written in Org mode. Includes recreating the Sphinx Makefile which is excluded due to the m4 toolchain in parent directories, it also handles the rewriting of the reST index file properly and rewrites the .texi files so they don't impale themselves on Unicode. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: docsBen McGinnes2018-12-218-51/+193
| | | | | | | | | | | | | * Found a bug in org-mode's export to texinfo function which will require either manual modification of each file or a customs sed run over the generated files for all updates. * Manually updated the current files for now, but will need to add some post-install processing scripts for future use (I already have some of these for my specific setup, they just need to be made a little more generic and platform independent for here). Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: groups exampleBen McGinnes2018-12-212-10/+10
| | | | | | * Tightened code a little more. Signed-off-by: Ben McGinnes <[email protected]>
* python docs: house keepingBen McGinnes2018-12-171-14/+27
| | | | | | | * Dropped the ASCII copyright line, since even MS have conceded their battle against Unicode enough to load UTF-8. * Fixed the drafts section since there will be less need of multiple output format testing from next year.
* python: howto and examplesBen McGinnes2018-12-164-59/+61
| | | | | | | * Tightening up both the documentation and some of the example code. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: examples bugfixBen McGinnes2018-12-134-5/+29
| | | | | | | * Fixed a bug in the ProtonMail importers (pmkey-*.py) where multiple keys found for a username would always result in the last email address checked being returned in the printed output for all located keys.
* python: new example scriptBen McGinnes2018-12-121-0/+80
| | | | | | | | | | * Though Keybase really should not be encouraged due to disengenuosness and FUD emanating from that souce, this new script will obtain a key hosted on that site and import it when supplied with the keybase username. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: what's new summaryBen McGinnes2018-12-123-0/+29
| | | | * Added a little more detail to the what's new section.
* python: advanced howto exampleBen McGinnes2018-12-121-0/+1
| | | | * Added Cython requirement to this advanced use case.
* python: howto examples equirementsBen McGinnes2018-12-121-0/+2
| | | | | | * Added small requirements.txt file for additional modules not in the standard python library and not including the bindings themselves and not including Cython, which is for more advanced examples.
* python: hkp key importerBen McGinnes2018-12-101-19/+24
| | | | | | * Tweaked it slightly to avoid repetition of key searches when there is only one search pattern to check (i.e. usually a single key ID or fingerprint).
* python: HKP search and import updatesBen McGinnes2018-12-104-41/+203
| | | | | | | * Tweaked the code again so that it can also handle the cases where someone has included a hexadecimal string in their user ID. * Updated the HOWTO to match. * Exported to .rst and .texi.
* python: key import via HKP exampleBen McGinnes2018-12-101-13/+11
| | | | | | | | | * Fixed the logic used to search for any given pattern. * Added a sensible method of checking whether a pattern is a key ID or fingerprint. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: docs updatesBen McGinnes2018-12-106-9/+172
| | | | | | | | | * Multiple updates, expanding on the Windows installation issues. * Also adding to the new maintenance mode reference document. * Includes content relating to the resolution of T4271 and T4191. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* Merge branch 'master' of ssh+git://playfair.gnupg.org/git/gpgmeBen McGinnes2018-12-052-59/+44
|\
| * python: overhaul logic of Context.decrypt()Daniel Kahn Gillmor2018-12-052-34/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
| * python: ctx.decrypt() has problematic error handlingDaniel Kahn Gillmor2018-12-051-0/+4
| | | | | | | | | | | | | | * 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 <[email protected]>
| * python: Clarify the meaning of ctx.decrypt(verify=[])Daniel Kahn Gillmor2018-12-051-1/+4
| | | | | | | | | | | | | | * 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 <[email protected]>
| * python: gpg.Context.decrypt verify_sigs and sink_result are boolsDaniel Kahn Gillmor2018-12-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
| * python: clarify documentation for verify argument for Context.decrypt()Daniel Kahn Gillmor2018-12-051-1/+2
| | | | | | | | | | | | | | 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 <[email protected]>
| * python: simplify Context.decrypt()Daniel Kahn Gillmor2018-12-051-27/+2
| | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | python: examplesBen McGinnes2018-12-055-8/+8
|/ | | | * cut some of then poor len usage.
* python: windows c and cythonBen McGinnes2018-12-043-0/+22
| | | | | | * added warning that he Windows C runtime issues will also affect use with Cython and that relying on binary installers would remove that possible use case.
* python: sphinx modificationBen McGinnes2018-12-041-35/+0
| | | | | | | | | | | | * The make.bat file incorrectly triggers the trailing whitespace check in the git repo (it doesn't actually have any trailing whitespace, but triggers the error on every line). * Will need to add a script to handle future org-mode conversions of the index page anyway, so will get that script to deal with this problem too by generating the make.bat file if the platform is detected as Windows. Signed-off-by: Ben McGinnes <[email protected]>