aboutsummaryrefslogtreecommitdiffstats
path: root/lang (follow)
Commit message (Collapse)AuthorAgeFilesLines
* js: fixed wrong paths in DemoExtensionMaximilian Krambach2018-04-263-3/+3
| | | | | | -- * Some forgotten internal links after the move to a subdir and cleaning
* js: created TestExtension and smaller fixesMaximilian Krambach2018-04-2628-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
* js: First testing and improvementsMaximilian Krambach2018-04-2512-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
* js: Configuration and Error handlingMaximilian Krambach2018-04-2510-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
* js: reactivate timeout on connectionMaximilian Krambach2018-04-254-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
* js: change in Error behaviourMaximilian Krambach2018-04-258-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.
* js: allow openpgp-like Message objects as DataMaximilian Krambach2018-04-251-0/+7
| | | | | | | -- * src/gpgmejs.js: If a message offers a getText, consider it as the message's content
* js: Key object adjustments after discussionMaximilian Krambach2018-04-243-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
* js: change in initialization ancd connection handlingMaximilian Krambach2018-04-246-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.
* js: don't allow message operation changesMaximilian Krambach2018-04-233-30/+24
| | | | | | | -- Once an operation is changed, their set of allowed/required parameters will change. So we shouldn't set/change the operation later.
* js: Key handling stubs, Error handling, refactoringMaximilian Krambach2018-04-238-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.
* js: encrypt improvement and decrypt methodMaximilian Krambach2018-04-2018-306/+887
| | | | | | | | | | | * 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 --
* Merge branch 'master' into javascript-bindingMaximilian Krambach2018-04-205-29/+91
|\
| * 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
* | js: Initial commit for JavaScript Native Messaging API[email protected]2018-04-1014-1/+472
|/ | | | | | | | | -- Note this code misses all the legal boilerplate; please add this as soon as possible and provide a DCO so we can merge it into master. I also removed the dist/ directory because that was not source code.
* 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.
| * | 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).