aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/gpgmejs_openpgpjs.js (follow)
Commit message (Collapse)AuthorAgeFilesLines
* js: remove openpgp modeMaximilian Krambach2018-05-231-301/+0
| | | | | | | -- * After discussion, that mode is not required, and can result in being quite misleading and a maintenance hassle later on.
* js: Tests and improvements for openpgp modeMaximilian Krambach2018-05-141-33/+44
| | | | | | | | | | | | | -- * 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
* js: changed Key class stubMaximilian Krambach2018-05-031-8/+18
| | | | | | | | -- * 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-271-1/+6
| | | | | | | | | | | | | | | -- * 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: created TestExtension and smaller fixesMaximilian Krambach2018-04-261-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | -- * 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: Configuration and Error handlingMaximilian Krambach2018-04-251-43/+63
| | | | | | | | | | | | | | | | | | | -- * 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: change in Error behaviourMaximilian Krambach2018-04-251-7/+7
| | | | | | | | -- * 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: Key object adjustments after discussionMaximilian Krambach2018-04-241-10/+57
| | | | | | | | | | | | -- * 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-241-10/+23
| | | | | | | | | | | | | -- * 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: Key handling stubs, Error handling, refactoringMaximilian Krambach2018-04-231-30/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | -- * 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-201-0/+156
* 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 --