aboutsummaryrefslogtreecommitdiffstats
path: root/lang (follow)
Commit message (Collapse)AuthorAgeFilesLines
* python bindings: core - key importgsoc/jacob-key-importBen McGinnes2018-06-171-9/+37
| | | | | | | | | | * Wrapped the key import function in the try/exception statements needed to catch at least the most likely unsuccessful import attempt errors. * Mostly draws on the file error and no data import statuses for errors, with a couple of exceptions. Signed-off-by: Ben McGinnes <[email protected]>
* python bindings: core key importBen McGinnes2018-06-162-5/+28
| | | | | | | | | | | | * The foundation of a pythonic key import function authored by Jacob Adams. * A unit testing script for the same function originally authored by Tobias Mueller * Added DCO reference for Jacob Adams to the GPGME AUTHORS file. * Additional details regarding this patch are available here: https://dev.gnupg.org/T4001 Signed-off-by: Ben McGinnes <[email protected]>
* 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.
* cpp: Add proper gpgme_op_createkeyAndre Heinecke2018-06-082-0/+25
| | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::createKeyEx): New. -- The createKeyEx function follows the usual pattern that the synchronous call returns a result directly while for the async an extra call is neccessary.
* 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.
* docs: python bindings howtoBen McGinnes2018-06-021-66/+73
| | | | | | | | | * Another attempt at fixing the org-mode version. * A proof reader ascertained there were tabs in it instead of whitespace. * Stripped the lot out and replaced with standard 4 spaces, fixed every incorrect example ... and it still breaks upon save and/or export. * Added the reference to the mutt-groups.py script to demonstrate the groups.py module/code.
* cpp: Add gpgme_(get)set_ctx_flagAndre Heinecke2018-06-012-0/+14
| | | | | | * NEWS: Mention API extensions. * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::setFlag, Context::getFlag): New.
* cpp: Add legacy_cipher_nomdcAndre Heinecke2018-06-012-0/+8
| | | | | | | * lang/cpp/src/decryptionresult.cpp, lang/cpp/src/decryptionresult.h (DecryptionResult::isLegacyCipherNoMDC): New. --
* cpp: Add gpgme_data_rewind to cpp APIAndre Heinecke2018-05-293-0/+27
| | | | | | | | | | | * lang/cpp/src/data.h, lang/cpp/src/data.cpp (Data::rewind): New. * lang/qt/tests/t-various.cpp (testDataRewind): Test it. -- The advantage of this convieniance function in GPGME is that it avoids the messiness that are declarations with off_t. GnuPG-Bug-Id: T3996
* 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-242-9/+13
| | | | | | | * 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.
* doc: python bindings howtoBen McGinnes2018-05-241-3/+2
| | | | | | * Fixed org-mode python source indenting. ** Note: nested indented blocks do not indent correctly when exported to [X]HTML.
* docs and examples: python howtoBen McGinnes2018-05-232-8/+22
| | | | | | | | * 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.
* cpp: Expose sessionKey and symkeyAlgoAndre Heinecke2018-05-222-0/+15
| | | | | * lang/cpp/decryptionresult.cpp, lang/cpp/decryptionresult.h (DecryptionResult::symkeyAlgo, DecryptionResult::sessionKey): New.
* python: key expiration datetime stamp testsBen McGinnes2018-05-051-1/+1
| | | | | | | | | * Changed the expiration date for the generated test key to NYE this century, rather than the NYE this millennium as originally suggested in job #3815. * This covers the lifetimes of current users (except, maybe, some very healthy millennials) as well as the 32-bit clock end date in 2038; without falling foul of OpenPGP's 2106 expiration.
* qt: Respect --disable-gpg-test for testsAndre Heinecke2018-05-041-1/+7
| | | | | | | * lang/qt/Makefile.am: Respect --disable-gpg-test -- This is similar to the core switch to disable the tests.
* qt: Fix filename handling in cryptoconfigAndre Heinecke2018-04-261-3/+3
| | | | | | | | | | | * src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfigEntry::urlValue): Build url from local file. (QGpgMENewCryptoConfigEntry::setURLValue): Set native seperated path. -- This fixes setting files through cryptoconfig on Windows. GnuPG-Bug-Id: T3939
* cpp: Add origin and last_update to UserIDAndre Heinecke2018-04-192-19/+47
| | | | | | | * NEWS: Mention it. * lang/cpp/src/key.cpp, lang/cpp/src/key.h (UserID::lastUpdate), (UserID::origin): New. (gpgme_origin_to_pp_origin): New helper.
* cpp: Add origin and last_updateAndre Heinecke2018-04-192-0/+52
| | | | | | * NEWS: mention interface change. * lang/cpp/src/key.cpp (Key::origin, Key::lastUpdate): New. * lang/cpp/src/key.h (Key::Origin): New enum.
* doc: Update copyright years and change two URLs.Werner Koch2018-04-182-11/+10
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* python: Fix crash by leaving struct members intactTobias Mueller2018-04-171-18/+1
| | | | | | | | | | | | | | | | | | | | | * lang/python/setup.py.in: Copy gpgme.h instead of parsing it. -- The python bindings tried to parse deprecated functions out of gpgme.h. This fails for the current gpgme.h in that it removes an entire field in the key sig struct (_obsolete_class). Hence, the fields were off by an int and the bindings accessed struct members via the wrong offset. That caused python program to crash. At least on 32bit platforms, the crash can be easily triggered by accessing key.uids[0].signatures. On 64bit platforms the compiler probably aligns the struct so that the missing 4 bytes are not noticed. With this change, the python bindings will expose all functions that gpgme exposes, including the deprecated ones. Credits go to Justus Winter for debugging and identying the issue. Signed-off-by: Tobias Mueller <[email protected]> GnuPG-bug-id: 3892
* qt: Add test for resetting config valueAndre Heinecke2018-04-041-1/+33
| | | | | | | | * lang/qt/tests/t-config.cpp (CryptoConfigTest::testDefault): New. -- There is a bug around here somewhere. This test does not show it :-(
* Merge branch 'master' of ssh+git://playfair.gnupg.org/git/gpgmeBen McGinnes2018-03-296-52/+496
|\ | | | | | | | | * Also fixed a small grammatical error highlighted by a merge conflict (in the python bindings howto).
| * example: revoke UIDben/howto-update-02Ben McGinnes2018-03-281-0/+62
| | | | | | | | * Script to revoke a UID on an existing key.
| * docs: python bindings howtoBen McGinnes2018-03-281-25/+53
| | | | | | | | * Added section on revoking UIDs.
| * example: key signingBen McGinnes2018-03-281-0/+63
| | | | | | | | * Added script for signing or certifying keys.
| * doc: python bindings howtoBen McGinnes2018-03-281-1/+1
| | | | | | | | * Fixed a typo.
| * docs python bindings howtoBen McGinnes2018-03-281-16/+19
| | | | | | | | | | * PEP8 compliance: a collection of minor edits across multiple example code snippets.
| * example: add user IDBen McGinnes2018-03-281-0/+62
| | | | | | | | * Added script to add a UID to an existing key.
| * doc: python bindings howtoBen McGinnes2018-03-271-6/+6
| | | | | | | | * Fixed some minor PEP8 compliance issues in the key creation examples.
| * 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.
| * doc: python bindings howtoBen McGinnes2018-03-251-0/+1
| | | | | | | | | | | | | | | | * Testing the addition of a HTML header set in org-mode in order to had RSS update links for files. * This should work with any [X]HTML export from current versions of Org-Mode, but if it also works on website generated pages then it'll tick off one of the wishlist itmes.
| * script: temp homedirhowto-update-01Ben McGinnes2018-03-251-1/+1
| | | | | | | | * Fixed whitespace.
| * doc: python bindings howtoBen McGinnes2018-03-251-0/+4
| | | | | | | | | | * Added a reference to new script which will setup a temporary homedir for a user.
| * 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).
| * doc: python bindings howtoBen McGinnes2018-03-241-4/+4
| | | | | | | | | | * Fixed the plaintext, result and verify_result references in the decryption section.
* | Merge branch 'master' of ssh+git://playfair.gnupg.org/git/gpgmeBen McGinnes2018-03-241-0/+1
|\|
| * Merge branch 'json-tool'Werner Koch2018-03-231-0/+1
| |\
| | * Merge branch 'master' into json-toolWerner Koch2018-03-202-0/+6
| | |\
| | * | json: Add framework for the gpgme-json toolWerner Koch2018-03-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme-json.c: New. * src/Makefile.am (bin_PROGRAMS): Add gpgme-json. (gpgme_json_SOURCES, gpgme_json_LDADD): New. Signed-off-by: Werner Koch <[email protected]>
* | | | doc: python bindings howtoBen McGinnes2018-03-231-1/+1
|/ / / | | | | | | | | | * Fixed a minor spelling error and a minor grammatical error.
* | | doc: python bindings howtoBen McGinnes2018-03-211-1/+1
| | | | | | | | | | | | * Fixed table.
* | | doc and examples: python bindings HOWTOBen McGinnes2018-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added GPGME Python bindings HOWTO in Australian/British English. ** en-US "translation" still to be done. * Added several example scripts comprised of the "Basic Functions" section of the HOWTO (plus the work-around at the end). ** As these scripts are very basic examples they are released under both the GPLv2+ and the LGPLv2.1+ (just like GPGME itself). Signed-off-by: Ben McGinnes <[email protected]>
* | | Merge branch 'ben/docs/2018-03' of ssh+git://playfair.gnupg.org/git/gpgme ↵Ben McGinnes2018-03-2114-1/+2090
|\ \ \ | |_|/ |/| | | | | into ben/docs/2018-03
| * | 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.