aboutsummaryrefslogtreecommitdiffstats
path: root/lang (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | js: more testingMaximilian Krambach2018-05-087-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
| * | | js: fixing errors found by testing: encrypt/decryptMaximilian Krambach2018-05-077-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.
| * | | js: fixing errors found by testingMaximilian Krambach2018-05-044-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
| * | | js: Added browser testing for unit testsMaximilian Krambach2018-05-0311-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.
| * | | js: changed Key class stubMaximilian Krambach2018-05-035-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.
| * | | js: more testingMaximilian Krambach2018-04-2716-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
| * | | js: fixed empty operation setter in MessageMaximilian Krambach2018-04-271-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | -- * src/Message.js Messages failed because they were not assigned operations
| * | | 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
| |\ \ \
| * | | | 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.
* | | | | Python bindings examplesBen McGinnes2018-08-193-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.
* | | | | Python bindings setup fileBen McGinnes2018-08-181-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Moved the build import back up where it belongs. * Included comments indicating how to build and install for multiple Python versions beyond the first 2 on the same system.
* | | | | Python bindings tests: Near PEP8 complianceBen McGinnes2018-08-1831-500/+773
| | | | | | | | | | | | | | | | | | | | * PEP8 compliance for the vast majoeity of the tests.
* | | | | Python bindings examples: PEP8 conplianceBen McGinnes2018-08-1812-35/+49
| | | | | | | | | | | | | | | | | | | | * Appears to be complete compliance.
* | | | | Python bindings setup: Near PEP8 complianceBen McGinnes2018-08-182-89/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/version.py.in: Fixed most things, but there's still an issue near the build portion with the existing Python bugs referenced. * lang/python/setup.py.in: Now PEP8 compliant.
* | | | | Python bindings constants: PEP8 compliance (almost)Ben McGinnes2018-08-1819-35/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PEP8 compliance for all constants except the globals in src/constants/__init__.py depending on whether the import sequence affects the globals themselves.
* | | | | Python bindings src: PEP8 complianceBen McGinnes2018-08-185-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | * import namespace clearance for src/*.py. * Fixed a handful of is/is not None checks as well.
* | | | | Symmetric exampleBen McGinnes2018-08-131-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]>
* | | | | Symmetric encryption exampleBen McGinnes2018-08-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/examples/howto/symcrypt-file.py: Fixed the error code and the passphrase key word arg.
* | | | | Symmetric encryption example.Ben McGinnes2018-08-131-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/examples/howto/symcrypt-file.py: A variation on standard key based encryption.
* | | | | PEP8 compliance and other code fixesBen McGinnes2018-08-1010-130/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ran all the .py files in src/ and below through Yapf. * Included some manual edits of core.py, this time successfully making two notorious sections a bit more pythonic than scheming. * Left the module imports as is. * This will be committed if it passes the most essential test: compiling, installing and running it. Signed-off-by: Ben McGinnes <[email protected]>
* | | | | Link fixesBen McGinnes2018-08-092-18/+18
| | | | | | | | | | | | | | | | | | | | * lang/python/README: Fixed links in both versions of the README.
* | | | | cpp: Fix use after free in gencardkeyinteractorAndre Heinecke2018-08-081-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/gpggencardkeyinteractor.cpp (GpgGenCardKeyInteractor::Private::keysize): Change to string. -- The value is only required as string so we can save it this way to avoid the need to convert it for the action command. GnuPG-Bug-Id: T4094
* | | | | Make GNUPGHOME for tests overridableAndre Heinecke2018-08-062-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/tests/Makefile.am, lang/qt/tests/Makefile.am, tests/Makefile.am, tests/gpg/Makefile.am, tests/gpgsm/Makefile.am, tests/opassuan/Makefile.am (GNUPGHOME): Make variable explict. -- If the build directory has too long path, gpgme could fail. This is similar to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847206 In order to fix that, this patch extracts the GNUPGHOME variable to be presented directly in the Makefile and thus overridable by command line option. A build system can then create a symlink to the GNUPGHOME directory in /tmp and use that symlink as the GNUPGHOME directory thus making the path very short. GnuPG-Bug-Id: T4091 Patch provided by vlmarek
* | | | | cpp: Add safety checks for key updateAndre Heinecke2018-07-242-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/key.cpp (Key::update): Check that the key is not NULL. * lang/cpp/src/verificationresult.cpp (GpgME::Signature::key): Check for fingerprint.
* | | | | docs: python bindings howtoBen McGinnes2018-07-221-170/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed and tested the changes necessary for org-mode to correctly parse pythonic (Python 3) indentation. * Updated the source blocks to recommended upper case for BEGIN_SRC and END_SRC. * Tested and confirmed XHTML output matches correct examples. * Tested against pseudo-control output via exporting from org-mode to org-mode and then exporting that to XHTML. Remaining differences appear to be discarding the custom tags used to provide X[HT]ML id elements to each section which does not appear to offer any benefit. * Exporting directly to XHTML or other HTML output should no longer cause problems, but if there are any then the first step should be exporting from org-to-org and then exporting that to XHTML. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* | | | | doc: python bindings howtoBen McGinnes2018-07-221-624/+623
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Another retrofitting of the HOWTO Python example code, this time following adjustments to python-mode configuration and having trawled through the org-mode mailing lists for clues.
* | | | | doc: python bindings howtoBen McGinnes2018-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | * Added org-mode byline.
* | | | | cpp: Print origin and last update for key/uidAndre Heinecke2018-07-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/key.cpp: Print origin and last update in iostream operators.
* | | | | qt: Handle encoding for diagnosticsAndre Heinecke2018-07-181-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/threadedjobmixin.cpp (fromEncoding) (stringFromGpgOutput): New helpers. (markupDiagnostics): Use it. -- The Problem is that on my western windows system GnuPG gets CP 437 as GetConsoleOutputCP and prints in that codepage. In a W32 GUI Application we get 0 as GetConsoleOutputCP and 1252 with GetACP. The only thing that seemed to somehow match was GetOEMCP but that might just be luck and it might still be broken in other windows languages. This code is also used in Kleopatra so it might make sense to make it public once it is demonstrated that it works on most systems.
* | | | | python bindings: example scriptsBen McGinnes2018-07-132-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.
* | | | | example scripts: python work-aroundsBen McGinnes2018-07-101-3/+3
| | | | | | | | | | | | | | | | | | | | * fixed three typos which were guaranteed to break said script.
* | | | | docs: python bindings howtoBen McGinnes2018-07-091-1251/+1235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Complete typographic overhaul. * Removed all section level indentation since it does not affect output formatting, but might affect source code examples. * In text-mode stripped out all tabs which had crept in and replaced them with four spaces. * Updated all code examples (again) to conform with Python-mode. * Bumped version number in preparation for next release of GPG 2.2.9 and corresponding GPGME release.
* | | | | python bindings: howto examplesBen McGinnes2018-07-0713-67/+71
| | | | | | | | | | | | | | | | | | | | | | | | | * Made sure all example scripts meet PEP8 compliance. * Required fixing approx. a dozen of them in minor ways.
* | | | | qt: Handle OpenPGP Diagnostic logAndre Heinecke2018-07-051-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Handle OpenPGP audit log differently.
* | | | | cpp: Add enum mapping for GPGME_AUDIT_LOG_DIAGAndre Heinecke2018-07-052-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | * src/context.cpp (to_auditlog_flags): Map DIAG value. * src/context.h (AuditLogFlags): Add it.
* | | | | cpp: Fix memory of DecryptionResult::symkeyAlgoAndre Heinecke2018-07-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/decryptionresult.cpp (Private, ~Private): strdup the symkey algo.
* | | | | python bindings: scheming serpentsBen McGinnes2018-07-011-69/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Apparently I am wrong and Scheme is the new Python after all. * Non-import related PEP8 compliance must wait for another day, though the other PEP8 fixes remain.
* | | | | python bindings: gpg.coreBen McGinnes2018-07-011-27/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changed id/else statements to a more pythonic form from scheme masquerading as python - sorry Justus, it had to go ;). * With the added bonus of enabling PEP8 compliance in those sections. * Fixed remaining PEP8 compliance issues with the exception of the imports at the beginning of the file (changing those will break the entire module, so we'll cope with it as it is).