aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/howto (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-10-13python,examples: Add missing word "License"Marius P35-35/+35
* lang/python/examples/howto/add-userid.py, lang/python/examples/howto/clear-sign-file.py, lang/python/examples/howto/create-key.py, lang/python/examples/howto/decrypt-file.py, lang/python/examples/howto/detach-sign-file.py, lang/python/examples/howto/encrypt-file.py, lang/python/examples/howto/encrypt-sign-file.py, lang/python/examples/howto/encrypt-to-group-gullible.py, lang/python/examples/howto/encrypt-to-group-trustno1.py, lang/python/examples/howto/encrypt-to-group.py, lang/python/examples/howto/export-key.py, lang/python/examples/howto/export-minimised-key.py, lang/python/examples/howto/export-secret-key.py, lang/python/examples/howto/export-secret-keys.py, lang/python/examples/howto/groups.py, lang/python/examples/howto/import-key.py, lang/python/examples/howto/import-keybasekey.py, lang/python/examples/howto/import-keys-hkp.py, lang/python/examples/howto/import-keys.py, lang/python/examples/howto/import-mailvelope-keys.py, lang/python/examples/howto/keycount.py, lang/python/examples/howto/local-sign-group.py, lang/python/examples/howto/mutt-groups.py, lang/python/examples/howto/pmkey-import-alt.py, lang/python/examples/howto/pmkey-import-hkp-alt.py, lang/python/examples/howto/pmkey-import-hkp.py, lang/python/examples/howto/pmkey-import.py, lang/python/examples/howto/revoke-userid.py, lang/python/examples/howto/send-key-to-keyserver.py, lang/python/examples/howto/sign-file.py, lang/python/examples/howto/sign-key.py, lang/python/examples/howto/symcrypt-file.py, lang/python/examples/howto/temp-homedir-config.py, lang/python/examples/howto/verify-signatures.py, lang/python/examples/howto/verify-signed-file.py: Add "License" after "Lesser General Public" -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
2023-04-25doc: Fix Python example code.NIIBE Yutaka3-12/+15
* lang/python/doc/src/gpgme-python-howto.org: Fix chmod race. * lang/python/examples/howto/export-secret-key.py: Likewise. * lang/python/examples/howto/export-secret-keys.py: Likewise. * lang/python/examples/howto/temp-homedir-config.py: Likewise. -- It's not for Python 2.7. GnuPG-bug-id: 6466 Reported-by: Hanno Böck Co-authored-by: Ingo Klöcker Signed-off-by: NIIBE Yutaka <[email protected]>
2019-02-10python: examplesBen McGinnes1-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]>
2019-01-27python: post installer scriptBen McGinnes1-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.
2019-01-27python: post installer docs fix scriptBen McGinnes1-0/+147
* 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]>
2018-12-21python: groups exampleBen McGinnes1-5/+5
* Tightened code a little more. Signed-off-by: Ben McGinnes <[email protected]>
2018-12-16python: howto and examplesBen McGinnes1-14/+10
* Tightening up both the documentation and some of the example code. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-12-13python: examples bugfixBen McGinnes4-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.
2018-12-12python: new example scriptBen McGinnes1-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]>
2018-12-12python: advanced howto exampleBen McGinnes1-0/+1
* Added Cython requirement to this advanced use case.
2018-12-12python: howto examples equirementsBen McGinnes1-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.
2018-12-10python: hkp key importerBen McGinnes1-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).
2018-12-10python: HKP search and import updatesBen McGinnes1-5/+38
* 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.
2018-12-10python: key import via HKP exampleBen McGinnes1-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]>
2018-12-05python: examplesBen McGinnes5-8/+8
* cut some of then poor len usage.
2018-11-06python examples: another importerBen McGinnes1-4/+8
* Fixed a similar type of bug with the non-protonmail importer.
2018-11-06python examples: protonmail hkp scriptsBen McGinnes2-28/+22
* fixed a bug in the import try statement for both versions.
2018-10-18doc: use https:// for www.gnu.orgDaniel Kahn Gillmor33-33/+33
-- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2018-09-27example: local signaturesBen McGinnes1-2/+22
* lang/python/examples/howto/local-sign-group.py: added the bit where specifying the signing key is actually used for signing rather than just pruning the list of keys to certify. Signed-off-by: Ben McGinnes <[email protected]>
2018-09-27example: python bindingsBen McGinnes1-0/+163
* lang/python/examples/howto/local-sign-group.py: locally sign every key in a group line except one's own keys. Intended to address the sort of thing one might see on lists like PGPNET or other closed groups amongst activists, journalists, etc. where everyone encrypts to all recipients, but may not sign everyone's keys publicly.. Signed-off-by: Ben McGinnes <[email protected]>
2018-09-26examples: python bindingsBen McGinnes5-10/+10
* Fixed homedir specifying logic in several cases.
2018-09-24docs and examples: python bindingsBen McGinnes5-16/+170
* Woumd up the "what's new" section. * Added an example for sending a key to the keyservers via hkp4py. * Updated the export key code to use a more complete check for the $GNUPGHOME location. * Expanded on the installation and reinstallation troubleshooting section. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-09-23docs and examples: python bindings howtoBen McGinnes2-0/+311
* Added more comprehensive examples using hkp4py and added a couple more example scripts for protonmail. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-09-23examples: python bindings and hkp4py updatesBen McGinnes28-28/+28
* Mostly tightening up the details on the hkp4py example script. * Also fixed a typo in the LGPL boiler plate text included in all the other example scripts for the HOWTO.
2018-09-22python bindings: importing from keyservers with hkp4pyBen McGinnes1-0/+91
* added a new example script to search the keyservers and import the results, this time using Marcel Fest's hkp4py module. * Updated the key importing section to match this addition. * Tested with the current version of hkp4py from github. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-09-17docs: python bindingsBen McGinnes2-4/+14
* Updated the Cython example code slightly, along with the corresponding explanation.
2018-09-16docs: cython sanitizedBen McGinnes1-2997/+0
* Sanitized the shell command examples of extraneous whitespace. * Removed keycount.c as sanitising it is pointless and it will be generated by Cython when the example is followed. * Regenerated the .texi version.
2018-09-16docs: python bindings howtoBen McGinnes3-0/+3019
* Added new advanced section with an example of using the Python bindings with CPython code compiled back to C code using Cython. * Though it may seem a bit counter-intuitive to use the bindings just to go back to C via a different route, this is not actually stupid. * Added examples/howto/advanced/cython/ directory. * Added keycount.pyx, setup.py and the keycount.c file which the first two generated with Cython. Not including the .so and .o files from the build. * Exported the .texi version of the howto for the main docs.
2018-09-15Python bindings: examplesBen McGinnes2-2/+8
* lang/python/examples/howto/export-secret-keys.py and groups.py: Updated the backwards compatibility adjustments to account for unicode differences between python 2 and 3.
2018-09-15Python examples: backwards compatibilityBen McGinnes2-2/+13
* lang/python/examples/howto/groups.py: subprocess update * lang/python/examples/howto/export-secret-keys.py: subprocess update Both of these try the nice and easy method of getting the subprocess output available in Python 3, but will fall back to the older Popen method if it doesn't work. Essentially this is to be a little nicer to Python 2.7.15 (even though the examples are filled with warnings that py2 support is not guaranteed with the examples).
2018-08-29docs: python bindings - protonmail examplesBen McGinnes2-0/+4
* lang/python/docs/GPGMEpythonHOWTOen.org: Updated links to the ProtonMail keyserver import scripts and added a warning regarding being unable to update third party keys. * lang/python/examples/howto/pmkey-import-alt.py: added usage. * lang/python/examples/howto/pmkey-import.py: added usage.
2018-08-19Python bindings examplesBen McGinnes3-1/+251
* import-key.py: fixed a minor typo. * pmkey-import.py: locates and imports keys from the ProtonMail keyserver. * pmkey-import-alt.py: the same as the previous except with setting an alternative $GNUPGHOME directory.
2018-08-13Symmetric exampleBen McGinnes1-2/+2
* lang/python/examples/howto/symcrypt-file.py: *sigh*; passphrase was right the first time, just the error check that wasn't. * I really should stop second guessing myself one of these days ... Signed-off-by: Ben McGinnes <[email protected]>
2018-08-13Symmetric encryption exampleBen McGinnes1-4/+4
* lang/python/examples/howto/symcrypt-file.py: Fixed the error code and the passphrase key word arg.
2018-08-13Symmetric encryption example.Ben McGinnes1-0/+63
* lang/python/examples/howto/symcrypt-file.py: A variation on standard key based encryption.
2018-07-13python bindings: example scriptsBen McGinnes2-2/+2
* Fixed incorrect mention of output prompt referencing secret keys when the scripts are only for exporting public keys in whole or minimised forms.
2018-07-10example scripts: python work-aroundsBen McGinnes1-3/+3
* fixed three typos which were guaranteed to break said script.
2018-07-07python bindings: howto examplesBen McGinnes13-67/+71
* Made sure all example scripts meet PEP8 compliance. * Required fixing approx. a dozen of them in minor ways.
2018-06-28python bindings examplesBen McGinnes1-0/+110
* Added a secret key export variant which saves output as both GPG binary and ASCII armoured, plus saves in $GNUPGHOME and uses multiple methods of determining what that location is.
2018-06-28python bindings examplesBen McGinnes1-0/+73
* Added a key import variant which accesses the SKS keyservers in a RESTful fashion and then imports or attempts to import the response.
2018-06-28python bindings examples: three export scriptsBen McGinnes3-0/+223
* Example of default exporting keys. * Example of exporting minimised keys. * Example of exporting secret keys to a file with correct permissions. Signed-off-by: Ben McGinnes <[email protected]>
2018-06-28python bindings: import exampleBen McGinnes1-0/+91
* Added an example script for importing a key from a file (either ASCII armoured or not).
2018-06-10script: groups.pyBen McGinnes1-1/+7
* Added check for if it is run on a Windows system so that the correct binary filename is invoked.
2018-06-07examples: python howtoBen McGinnes3-0/+262
* Uses the groups module to prepare a list of recipients and encrypt to those. * The main version (encrypt-to-group.py) tries to check for invalid recipients, but still falls back to always trust for the second encryption attempt. * The gullible version doesn't try pruning the recipient list at all, it just tries to encrypt and if it fails, switches straight to always trust. * The trustno1 version doesn't use the always trust model at all and only attempts pruning the list of invalid recipients.
2018-05-24examples: mutt crypt-hooks generatorBen McGinnes1-0/+64
* Added a script which demonstrates how the groups module works. * Script generates Mutt/Neomutt crypt-hooks for every group entry in gpg.conf, including those entries for multiple keys (Mutt handles that differently).
2018-05-24docs: python bindings howtoBen McGinnes1-4/+6
* Fixed the groups.py script so it really does what is described (the old code had the same result for groups, group_lines and group_lists). * Updated the corresponding example in the doc to match.
2018-05-23docs and examples: python howtoBen McGinnes1-3/+10
* Updated the decryption example code in the HOWTO and the corresponding decrypt-file.py script to gracefully handle a decryption failure. This error will always be triggered when GPGME is used to try to decrypt an old, MDC-less encrypted message or file.
2018-03-28example: revoke UIDben/howto-update-02Ben McGinnes1-0/+62
* Script to revoke a UID on an existing key.
2018-03-28example: key signingBen McGinnes1-0/+63
* Added script for signing or certifying keys.
2018-03-28example: add user IDBen McGinnes1-0/+62
* Added script to add a UID to an existing key.