aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/index.js (follow)
Commit message (Collapse)AuthorAgeFilesLines
* js: remove openpgp modeMaximilian Krambach2018-05-231-6/+1
| | | | | | | -- * After discussion, that mode is not required, and can result in being quite misleading and a maintenance hassle later on.
* js: changed Key class stubMaximilian Krambach2018-05-031-2/+5
| | | | | | | | -- * 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-9/+14
| | | | | | | | | | | | | | | -- * 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-23/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | -- * 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-4/+5
| | | | | | | | | | | | | | | | | | | -- * 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-1/+2
| | | | | | | | -- * 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-2/+2
| | | | | | | | | | | | -- * 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-3/+37
| | | | | | | | | | | | | -- * 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: encrypt improvement and decrypt methodMaximilian Krambach2018-04-201-12/+21
| | | | | | | | | | | * 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 --
* js: Initial commit for JavaScript Native Messaging API[email protected]2018-04-101-0/+14
-- 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.