aboutsummaryrefslogtreecommitdiffstats
path: root/lang (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* python bindings: export secret keysBen McGinnes2018-06-281-1/+42
| | | | | | | | | | | | | | * The holy grail: a function to export secret keys. * GPGME will still invoke pinentry and gpg-agent as usual to authorise the export. * Mostly similar to the two previous export functions for public keys except that it will return None if the result had a length of zero bytes. Meaning that the difference between the specified pattern (if any) not matching available keys and an incorrect passphrase is not able to be determined from this function (or the underlying one for that matter). Signed-off-by: Ben McGinnes <[email protected]>
* python bindings: export public keysBen McGinnes2018-06-281-6/+18
| | | | | | * Updated key_export and key_export_minimal to return None where a pattern matched no keys in a manner simnilar to the possible result of key_export_secret.
* python bindings: export public keysBen McGinnes2018-06-281-1/+58
| | | | | | | | | | | | * Added functions for exporting public keys to gpg.core in both complete form and in minimised form. * Rather than letting people need to worry about the export modes we are simply separating the functions as people would be more familiar with from the command line usage anyway. * Functions added for Context are: ctx.key_export_minimal and ctx.key_export as the default or full export. Signed-off-by: Ben McGinnes <[email protected]>
* python bindings: core import statementsBen McGinnes2018-06-171-3/+3
| | | | * Fixed the bit I broke while fixing the PEP8 compliance issues.
* python bindings: core — PEP8 complianceBen McGinnes2018-06-171-77/+101
| | | | | | | | * Fixed most of the PEP8 errors in core.py * Those remaining may need more than little edits and are a bit strange (too clearly the result of a programmer who has spent far too much time dealing with Lisp so that for Python it looks ... strange).
* 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.