aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/howto (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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: examplesBen McGinnes2018-12-055-8/+8
| | | | * cut some of then poor len usage.
* python examples: another importerBen McGinnes2018-11-061-4/+8
| | | | * Fixed a similar type of bug with the non-protonmail importer.
* python examples: protonmail hkp scriptsBen McGinnes2018-11-062-28/+22
| | | | * fixed a bug in the import try statement for both versions.
* doc: use https:// for www.gnu.orgDaniel Kahn Gillmor2018-10-1833-33/+33
| | | | | | -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* example: local signaturesBen McGinnes2018-09-271-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]>
* example: python bindingsBen McGinnes2018-09-271-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]>
* examples: python bindingsBen McGinnes2018-09-265-10/+10
| | | | * Fixed homedir specifying logic in several cases.
* docs and examples: python bindingsBen McGinnes2018-09-245-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]>
* docs and examples: python bindings howtoBen McGinnes2018-09-232-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]>
* examples: python bindings and hkp4py updatesBen McGinnes2018-09-2328-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.
* python bindings: importing from keyservers with hkp4pyBen McGinnes2018-09-221-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]>
* docs: python bindingsBen McGinnes2018-09-172-4/+14
| | | | | * Updated the Cython example code slightly, along with the corresponding explanation.
* docs: cython sanitizedBen McGinnes2018-09-161-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.
* docs: python bindings howtoBen McGinnes2018-09-163-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.
* Python bindings: examplesBen McGinnes2018-09-152-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.
* Python examples: backwards compatibilityBen McGinnes2018-09-152-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).
* docs: python bindings - protonmail examplesBen McGinnes2018-08-292-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.
* Python bindings examplesBen McGinnes2018-08-193-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.
* Symmetric exampleBen McGinnes2018-08-131-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]>
* Symmetric encryption exampleBen McGinnes2018-08-131-4/+4
| | | | | * lang/python/examples/howto/symcrypt-file.py: Fixed the error code and the passphrase key word arg.
* Symmetric encryption example.Ben McGinnes2018-08-131-0/+63
| | | | | * lang/python/examples/howto/symcrypt-file.py: A variation on standard key based encryption.
* python bindings: example scriptsBen McGinnes2018-07-132-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.
* example scripts: python work-aroundsBen McGinnes2018-07-101-3/+3
| | | | * fixed three typos which were guaranteed to break said script.
* python bindings: howto examplesBen McGinnes2018-07-0713-67/+71
| | | | | * Made sure all example scripts meet PEP8 compliance. * Required fixing approx. a dozen of them in minor ways.
* python bindings examplesBen McGinnes2018-06-281-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.
* python bindings examplesBen McGinnes2018-06-281-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.
* python bindings examples: three export scriptsBen McGinnes2018-06-283-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]>
* python bindings: import exampleBen McGinnes2018-06-281-0/+91
| | | | | * Added an example script for importing a key from a file (either ASCII armoured or not).
* script: groups.pyBen McGinnes2018-06-101-1/+7
| | | | | * Added check for if it is run on a Windows system so that the correct binary filename is invoked.
* examples: python howtoBen McGinnes2018-06-073-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.
* examples: mutt crypt-hooks generatorBen McGinnes2018-05-241-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).
* docs: python bindings howtoBen McGinnes2018-05-241-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.
* docs and examples: python howtoBen McGinnes2018-05-231-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.
* example: revoke UIDben/howto-update-02Ben McGinnes2018-03-281-0/+62
| | | | * Script to revoke a UID on an existing key.
* example: key signingBen McGinnes2018-03-281-0/+63
| | | | * Added script for signing or certifying keys.
* example: add user IDBen McGinnes2018-03-281-0/+62
| | | | * Added script to add a UID to an existing key.
* example: key creationBen McGinnes2018-03-271-0/+95
| | | | | | | | * Script to generate a new key with encryption subkey taking input from interactive prompts. * Will also take a passphrase via pinentry and uses passphrase caching of five minutes when used in conjunction with the temp homedir script.
* script: temp homedir configBen McGinnes2018-03-271-2/+9
| | | | * added passphrase caching of 5 minutes.
* script: temp homedirhowto-update-01Ben McGinnes2018-03-251-1/+1
| | | | * Fixed whitespace.
* script: temporary homedir creationBen McGinnes2018-03-251-0/+119
| | | | | | | | | | * Script to create a temporary gnupg homedir in the user's directory for testing or scripting purposes. * Creates a hidden directory on POSIX systems with the correct permissions (700). * Creates a gpg.conf in that directory containing the same configuration options as used in the "Danger Mouse" example in the HOWTO with the correct permissions (600).
* examples: multi-key selection operationsben/docs/2018-03Ben McGinnes2018-03-213-190/+0
| | | | | | | | | * Temporarily removing multi-key selection based examples. * There are a few issues with getting the key selections to play nicely with gpg.Context().keylist object types. * Will troubleshoot them separately and restore them when that's worked out, but I don't want these more complicated examples to delay merging the HOWTO with master.
* example: group encryptionBen McGinnes2018-03-211-1/+1
| | | | * Troubleshooting.
* examples: encryptionBen McGinnes2018-03-212-2/+2
| | | | * Fixed two incorrect Context() objects.
* example: key selectionBen McGinnes2018-03-211-1/+0
| | | | * Removed extraneous blank line.
* example: key selectionBen McGinnes2018-03-211-0/+52
| | | | | | * Similar to group-key-selection.py, but does not use an existing group from gpg.conf; instead takes multiple key IDs, fingerprints or patterns on the command line and adds them to a keylist object.
* example: sign and encrypt to groupBen McGinnes2018-03-211-0/+83
| | | | | | | * Begins to string together some of the simpler examples to do more useful things. * Signs and encrypts a file while encrypting to every key in a group specified in the gpg.conf file.
* example: group key selectionBen McGinnes2018-03-211-0/+56
| | | | | * Example of preparing a keylist object using an existing group line from the gpg.conf file.
* example groups work aroundBen McGinnes2018-03-211-1/+1
| | | | | | | * Updated usage so it only references importing the final list of lists produced. Trying to use some of the mid-points can have unpredictable results (this is part of the problem with work arounds).
* example: groupsBen McGinnes2018-03-211-0/+6
| | | | * Added a docstring.