aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/howto (unfollow)
Commit message (Collapse)AuthorFilesLines
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.
2018-03-27example: key creationBen McGinnes1-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.
2018-03-27script: temp homedir configBen McGinnes1-2/+9
* added passphrase caching of 5 minutes.
2018-03-25script: temp homedirhowto-update-01Ben McGinnes1-1/+1
* Fixed whitespace.
2018-03-25script: temporary homedir creationBen McGinnes1-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).
2018-03-21examples: multi-key selection operationsben/docs/2018-03Ben McGinnes3-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.
2018-03-21example: group encryptionBen McGinnes1-1/+1
* Troubleshooting.
2018-03-21examples: encryptionBen McGinnes2-2/+2
* Fixed two incorrect Context() objects.
2018-03-21example: key selectionBen McGinnes1-1/+0
* Removed extraneous blank line.
2018-03-21example: key selectionBen McGinnes1-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.
2018-03-21example: sign and encrypt to groupBen McGinnes1-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.
2018-03-21example: group key selectionBen McGinnes1-0/+56
* Example of preparing a keylist object using an existing group line from the gpg.conf file.
2018-03-21example groups work aroundBen McGinnes1-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).
2018-03-21example: groupsBen McGinnes1-0/+6
* Added a docstring.
2018-03-21example: verify signaturesBen McGinnes1-0/+64
* Added example for verifying detached signatures against the files they're the signatures for.
2018-03-21example: verify signed fileBen McGinnes1-0/+61
* Added example to verify normal and clearsigned files.
2018-03-21example: detach sign fileBen McGinnes1-0/+64
* Added example to make detached signatures of a file with key selection.
2018-03-21example: encrypt-sign-file.pyBen McGinnes1-2/+2
* Adjusted the doc string.
2018-03-21examples: doc stringsBen McGinnes2-2/+4
* Fixed minor errors in two doc strings.
2018-03-21example: clear signingBen McGinnes1-0/+56
* Added example to clear sign a file with signing key selection.
2018-03-21example: sign fileBen McGinnes1-0/+63
* Similar to encrypt file except for signing a file in normal mode. * Noticed additional changes to be made to the howto to match this, but they will have to wait due to a power outage (currently running on battery and a mobile connection, but that won't last).
2018-03-20example: keycountBen McGinnes1-1/+1
* Fixed missing parenthesis.
2018-03-20example: decrypt fileBen McGinnes1-0/+44
* Decrypts a file taking file names as command line parameters.
2018-03-20example: groups work-aroundBen McGinnes1-0/+44
* Added groups selection work around code. * Intended for use as a module to be imported by other scripts, usually with "from groups import group_lists" or "from groups import group_lines" or similar.
2018-03-19example: encrypt fileBen McGinnes1-8/+14
* Nested encryption in try/except statement in case recipient key is untrusted or invalid.
2018-03-19example: sign and encrypt fileBen McGinnes1-0/+70
* Example to sign and encrypt a file. * Similar to encrypt-file.py except all keys are considered trusted and signs with the default key. * Also encrypts to the default key.
2018-03-19example: encrypt fileBen McGinnes1-1/+1
* Fixed typo in second encryption call.
2018-03-19example: encrypt fileBen McGinnes1-0/+64
* Example to encrypt a file to a single key. * Takes key ID and/or fpr as a CLI parameter. * Takes path and filename as a CLI parameter. * Encrypts to specified key only, no signing and writes the output in both ASCII armoured and GPG binary formats with output filenames based on input filename.
2018-03-19example: python bindings key countBen McGinnes1-0/+42
* Added script wo count the number of keys in both the public and secret key stores.
2018-03-19doc: python bindings examplesBen McGinnes1-0/+6
* Explicitly stated that all this code is released under the GPLv2+ and the LGPLv2.1+.
2018-03-19doc: python bindings example READMEBen McGinnes1-0/+28
* Added the same license as used with the HOWTO. * Since these examples are so basic, they'll be dual licensed the same as GPGME itself (otherwise it would slip too dangerously against the need for permissive licensing of crypto libraries).