aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/howto/temp-homedir-config.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-05-28js: Treat a connection as a gpgme ContextMaximilian Krambach12-171/+59
-- * After an operation a connection should be disconnected again. The "end of operation" is now assumed to be either an error as answer, or a message not including a "more" * GPGME, GPGME_Key, GPGME_Keyring don't require a connection anymore * Message.js: The Message.post() method will open a connection as required
2018-05-25js: implement Key handling (1)Maximilian Krambach7-176/+446
-- * Keys can now be queried for information. Onne version queries gnug directly (asynchronous Promise in javascript terms), the cached version refreshes on demand. * Small fixes: src/Connection.js joins answers that stay json properly now
2018-05-25js: use version operation for connection checksMaximilian Krambach8-108/+162
-- * src/Connection.js: isConnected was renamed to checkConnection, that returns a promise with either version information or Boolean * Connection checks have been adapted to reflect that checkConnection returns a Promise * BrowsertestExtension: tests/signTest.js was missing from my last commit
2018-05-24js: adding sign methodMaximilian Krambach3-1/+82
-- * src/gpgmejs.js: method, update in src/permittedOperations * basic testing in BrowsertestExtension
2018-05-24json: Put signature info before data outputAndre Heinecke1-9/+9
* src/gpgme-json.c (op_decrypt): Move info before data. -- This should enable it to first parse signatures before handling very large chunks of data.
2018-05-24json: Add sign to helpAndre Heinecke1-0/+1
* src/gpgme-json.c (hlp_help): Add sign.
2018-05-24json: Add op_signAndre Heinecke1-0/+177
* src/gpgme-json.c (op_sign): New.
2018-05-24json: Fix invalid function callAndre Heinecke1-1/+1
* src/gpgme-json.c (add_signatures_to_object): Fix call to xjson_CreateArray. -- That is what happens if you edit code while reviewing changes, without testing it again,..
2018-05-24json: Print signatures for decrypt/verifyAndre Heinecke1-0/+211
* gpgme-json.c (xJSON_CreateArray), (add_summary_to_object, validity_to_string): New helpers. (add_signature_to_object, add_signatures_to_object) (add_signatures_object): New. (op_decrypt): Handle verify_result. (hlp_help): Mention decrypt.
2018-05-24json: Minor typo fixesAndre Heinecke1-3/+3
* src/gpgme-json.c: Minor typo fixes.
2018-05-23js: remove openpgp modeMaximilian Krambach12-578/+9
-- * After discussion, that mode is not required, and can result in being quite misleading and a maintenance hassle later on.
2018-05-23docs and examples: python howtoBen McGinnes2-7/+21
* 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-05-22js: transfer encoding changesMaximilian Krambach7-106/+173
-- * Uint8Arrays are not supported for now there are unsolved issues in conversion, and they are lower priority * encrypt gains a new option to indicate that input values are base64 encoded * as decrypted values are always base64 encoded, the option base64 will not try to decode the result into utf, but leave it as it is
2018-05-22cpp: Expose sessionKey and symkeyAlgoAndre Heinecke3-0/+19
* lang/cpp/decryptionresult.cpp, lang/cpp/decryptionresult.h (DecryptionResult::symkeyAlgo, DecryptionResult::sessionKey): New.
2018-05-17core, w32: Add w64 handling for regkeysAndre Heinecke1-3/+22
* src/w32-util.c (_gpgme_get_gpg_path): Use new defines. (GNUPG_REGKEY_2): x64 aware regkey as used by GnuPG in Gpg4win 2.x (GNUPG_REGKEY_3): x64 aware regkey as used by GnuPG in Gpg4win 3.x (_gpgme_get_gpgconf_path): Use new regkeys. Add another fallback. -- This should fix more "unsupported protocol" issues if Gpg4win / GnuPG is installed in a non standard path on 64bit systems. The regkey handling is similar to that of gpgex and gpgol. GnuPG-Bug-Id: T3988
2018-05-17core: Always fail if an OpenPG message is not integrity protected.Werner Koch3-8/+24
* src/decrypt.c (struct op_data_t): Add field not_integrity_protected. (parse_decryption_info): Set this. Also rename mode to aead_algo for clarity. (_gpgme_decrypt_status_handler): Force failure in case of a missing MDC. -- This extra check makes sure that a missing or stripped MDC in - gpg < 2.1 - or gpg 2.2 with an old cipher algorithm will lead to a decryption failure. gpg 2.3 will always fail in this case. Implementing this check here and not backporting the 2.3 change to 2.2 has the benefit that all GPGME using applications are protected but scripts relying on rfc2440 (i.e. without MDC) will only break when migrating to 2.3. Note that S/MIME has no integrity protection mechanism but gpgsm neither emits a DECRYPTION_INFO status line, so an error will not be triggered. If in the future gpgsm supports authenticated encryption it may issue a DECRYPTION_INFO line to force a failure here but it will in that case also emit a DECRYPTION_FAILED anyway. GnuPG-bug-id: 3981 Signed-off-by: Werner Koch <[email protected]>
2018-05-14js: Testing lare messagesMaximilian Krambach3-29/+51
-- * Some assumption on messages were wrong. Now the tests use more reasonable sizes. * bigString now uses the full utf8-extent, with the exception of U+0000. This code gets dropped during the encryption-decryption process.
2018-05-14js: remove non-browser testsMaximilian Krambach6-264/+0
-- * The majority of tests needs to be run in a nativeMessaging context. Offering the few tests that don't need this context at two places introduces issues with maintainability. All tests now removed can be found in ./unittests.js
2018-05-14js: Tests and improvements for openpgp modeMaximilian Krambach10-161/+346
-- * Added openpgp - Mode tests to the browsertest Extension. These tests require openpgp, which should not be a hard dependency for the main project. Packing openpgpjs into the extension is still TODO * Fixes: - openpgp mode API now correctly handles parameters as an object, similar to openpgpjs - proper check and parsing of openpgpjs Message Objects
2018-05-09js: more testing of nativeMessaging connectionMaximilian Krambach12-162/+328
-- * There were some inconsistencies between utf-8, transfer and browsers' utf16, which broke characters that were split between individual messages. src/Connection now contains a workaround that reassembles javascripts' format from passed base64 strings. This needs someone more experienced looking. * Added several new tests which were failing during initial debugging of this issue * reorganized BrowsertestExtension to avoid cluttering.
2018-05-09json: Improve auto-base64 encoding to not split UTF-8 chars.Werner Koch1-8/+14
* src/gpgme-json.c (make_data_object): Switch to Base64 also for UTF-8 characters. Signed-off-by: Werner Koch <[email protected]>
2018-05-09core: Make the status-fd monitor work for all gpgsm commands.Werner Koch1-1/+10
* src/engine-gpgsm.c (status_handler): Call the status monitor also here. Signed-off-by: Werner Koch <[email protected]>
2018-05-08js: more testingMaximilian Krambach7-19/+342
-- * Tests: Under certain circumstances, some data change during encrypt-decrypt. Committing the current state so the problem can be discussed. * Fixes: - disconnecting the test ports after tests are complete - fixed passing of the error message from gpgme-json
2018-05-07js: fixing errors found by testing: encrypt/decryptMaximilian Krambach7-23/+219
-- * Key.js: Error code for wrong parameter in createKey should be "PARAM_WRONG" * Helpers.js: The property openpgpjs-like Objects were checked for in toKeyIdArray was not defined. * src/permittedOperations.js: updated more expectations and assumptions for the native API * new Problems: - There seems to be a message size limit of about 21 MB for nativeMessaging, much lower than the documented 4GB. - Some bytes are lost with random data in an encrypt-decrypt roundtrip. The culprit is unclear.
2018-05-05python: key expiration datetime stamp testsBen McGinnes1-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.
2018-05-04js: fixing errors found by testingMaximilian Krambach4-23/+66
-- * Key.js: Error code for wrong parameter in createKey should be "PARAM_WRONG" * Helpers.js: The property openpgpjs-like Objects were checked for in toKeyIdArray was not defined. * src/permittedOperations.js: updated more expectations and assumptions for the native API
2018-05-04qt: Respect --disable-gpg-test for testsAndre Heinecke1-1/+7
* lang/qt/Makefile.am: Respect --disable-gpg-test -- This is similar to the core switch to disable the tests.
2018-05-03js: Added browser testing for unit testsMaximilian Krambach11-16/+436
-- * Added unittests to be run inside a Browser. To be able to access the non-exposed functions and classes, a testing bundle will be created, containing the tests (unittests.js) and the items to be tested. * src/Helpelpers, src/Key, src/Keyring: fixed some errors found during testing.
2018-05-03js: changed Key class stubMaximilian Krambach5-68/+110
-- * src/Key.js: A Key object cannot offer more than basic functionality outside a connection, so it now requires a connection to be present.
2018-04-27js: more testingMaximilian Krambach16-114/+416
-- * Tests: initialization of the two modes, encryption * gpgme.js: reintroduced message check before calling Connection.post() * gpgmejs_openpgp.js: Fixed openpgp mode not passing keys * index.js: fixed some confusion in parseconfig() * Inserted some TODO stubs for missing error handling
2018-04-27js: fixed empty operation setter in MessageMaximilian Krambach1-2/+9
-- * src/Message.js Messages failed because they were not assigned operations
2018-04-26js: fixed wrong paths in DemoExtensionMaximilian Krambach3-3/+3
-- * Some forgotten internal links after the move to a subdir and cleaning
2018-04-26js: created TestExtension and smaller fixesMaximilian Krambach28-143/+429
-- * Extensions: - Moved testapplication to Demoextension - Created BrowserTestExtension. Includes mocha and chai. For running tests that cannot be run outside a WebExtension Both Extensions can be found zipped in build/extensions after running build_extensions.sh * Code changes: - src/Config: Place for the configuration - small fixes raised during testing in Keyring.js, Message.js, - src/gpgmejs_openpgpjs.js don't offer direct GpgME object to the outside, as it only causes confusion - index.js init() now checks the config for validity * Tests: - Reordered tests in test/. - Input values are now in a separate file which may be of use for bulk testing * moved the build directory from dist to build
2018-04-26qt: Fix filename handling in cryptoconfigAndre Heinecke1-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
2018-04-25js: First testing and improvementsMaximilian Krambach12-56/+227
-- * Introduced Mocha/chai as testsuite. After development build 'npm test' should run the unit tests. Functionality exclusive to Browsers/WebExtensions cannot be run this way, so some other testing is still needed. - package.json: Added required development packages - .babelrc indirect configuration for mocha. ES6 transpiling needs some babel configuration, but mocha has no setting for it. - test/mocha.opts Vonfiguration for mocha runs * Fixed errors: - Helpers.js toKeyIdArray; isLongId is now exported - Key.js Key constructor failed - Message.js will not throw an Error during construction, a new message is now created with createMessage, which can return an Error or a GPGME_Message object * Tests: - test/Helpers: exports from Helpers.js, GPGME_Error handling - test/Message: first init test with bad parameters
2018-04-25js: Configuration and Error handlingMaximilian Krambach10-207/+309
-- * gpgmejs_openpgpjs - unsuported values with no negative consequences can now reject, warn or be ignored, according to config.unconsidered_params - cleanup of unsupported/supported parameters and TODOS * A src/index.js init() now accepts a configuration object * Errors will now be derived from Error, offering more info and a stacktrace. * Fixed Connection.post() timeout triggering on wrong cases * Added comments in permittedOperations.js, which gpgme interactions are still unimplemented and should be added next
2018-04-25js: reactivate timeout on connectionMaximilian Krambach4-12/+19
-- * A timeout of 5 seconds is activated for functions that do not require a pinentry. This definition is written to src/permittedOperations.js * testapplication.js now alerts the proper error codes and messages. * src/Errors.js fixed two typos in error handling
2018-04-25js: change in Error behaviourMaximilian Krambach8-156/+132
-- * Error objects will now return the error code if defined as error type in src/Errors.js, or do a console.log if it is a warning. Errors from the native gpgme-json will be marked as GNUPG_ERROR.
2018-04-25js: allow openpgp-like Message objects as DataMaximilian Krambach1-0/+7
-- * src/gpgmejs.js: If a message offers a getText, consider it as the message's content
2018-04-24js: Key object adjustments after discussionMaximilian Krambach3-15/+64
-- * src/aKey.js changed fingerprint to setter (to avoid overwrites) * src/gpgmejs_openpgpjs.js - Added a class GPGME_Key_openpgpmode, which allows for renaming and deviation from GPGME. - renamed classes *_openPGPCompatibility to *_openpgpmode. They are not fully compatible, but only offer a subset of properties. Also, the name seems less clunky
2018-04-24js: change in initialization ancd connection handlingMaximilian Krambach6-114/+157
-- * The Connection will now be started before an object is created, to better account for failures. * index.js: now exposes an init(), which returns a Promise of configurable <GpgME | gpgmeGpgME_openPGPCompatibility> with an established connection. * TODO: There is currently no way to recover from a "connection lost" * Connection.js offers Connection.isConnected, which toggles on port closing.
2018-04-23js: don't allow message operation changesMaximilian Krambach3-30/+24
-- Once an operation is changed, their set of allowed/required parameters will change. So we shouldn't set/change the operation later.
2018-04-23js: Key handling stubs, Error handling, refactoringMaximilian Krambach8-131/+756
-- * Error handling: introduced GPGMEJS_Error class that handles errors at a more centralized and consistent position * src/Connection.js: The nativeMessaging port now opens per session instead of per message. Some methods were added that reflect this change - added methods disconnect() and reconnect() - added connection status query * src/gpgmejs.js - stub for key deletion - error handling - high level API for changing connection status * src/gpgmejs_openpgpjs.js - added stubs for Key/Keyring handling according to current state of discussion. It is still subject to change * src/Helpers.js - toKeyIdArray creates an array of KeyIds, now accepting fingerprints, GPGMEJS_Key objects and openpgp Key objects. * Key objects (src/Key.js) Querying information about a key directly from gnupg. Currently a stub, only the Key.fingerprint is functional. * Keyring queries (src/Keyring.js): Listing and searching keys. Currently a stub.
2018-04-20js: encrypt improvement and decrypt methodMaximilian Krambach18-304/+885
* Compatibility class gpgme_openpgpjs offers an API that should accept openpgpjs syntax, throwing errors if a parameter is unexpected/not implemented * tried to be more generic in methods * waiting for multiple answers if 'more' is in the answer * more consistency checking on sending and receiving * updated the example extension --
2018-04-20core: Do not modify args for ignored failuresAndre Heinecke1-4/+3
* src/op-support.c (_gpgme_parse_failure): Ignore gpg-exit failures before modifying args. -- For op_decrypt_verify the status handler for both decrypt and verify would parse the failure when the first parser ignored the failure. This resulted in an ERR_INV_ENGINE as the first call to parse_failure modified the args. GnuPG-Bug-Id: T3919
2018-04-20Post release updatesWerner Koch2-1/+5
--
2018-04-20Release 1.11.1gpgme-1.11.1Werner Koch2-5/+12
* configure.ac: Bump LT version to C31/A20/R1. For cpp to C13/A7/R0. For qt to: C10/A3/R2. Signed-off-by: Werner Koch <[email protected]>
2018-04-20core: Remove another debug output leftover.Werner Koch1-1/+0
* src/decrypt.c (_gpgme_decrypt_status_handler): Remove log debug. Signed-off-by: Werner Koch <[email protected]>
2018-04-20build: More release creation automation.Werner Koch1-1/+58
* Makefile.am: Add release and sign-release targets. Signed-off-by: Werner Koch <[email protected]>
2018-04-20doc: Suggest the use of strconcat for recipient strings.Werner Koch1-0/+55
-- GnuPG-bug-id: 3775 Signed-off-by: Werner Koch <[email protected]>