aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/permittedOperations.js (follow)
Commit message (Collapse)AuthorAgeFilesLines
* js: update decrypt/verify resultsMaximilian Krambach2018-08-211-2/+2
| | | | | | | | | | -- * src/gpgmejs.js: Decrypt now parses additional optional dec_info information, as well as any verify information, if present * src/permittedOperations: Now decrypt also expect the new return object dec_inf (containing info such as is_mime and file_name)
* js: add option "subkey-algo" to generateKeyMaximilian Krambach2018-08-201-0/+3
| | | | | | | -- * The option was recently added to gpgme-json; this reflects this on javascript side
* js: add and apply eslint rulesMaximilian Krambach2018-08-201-6/+6
| | | | | | -- * mainly spacing, see .eslintrc.json for details
* js: correct decrypt result info (2)Maximilian Krambach2018-08-171-3/+3
| | | | | | | -- * the permittedOperation from last commit ended up in the wrong place. sign does not return an additional 'info' object.
* js: expect additional 'info' to arrive on decrypt, tooMaximilian Krambach2018-08-171-1/+2
| | | | | | | -- * src/permittedOperations.js: if decrypt includes a verification, this info needs to pass, too.
* js: typo in commentMaximilian Krambach2018-07-181-1/+1
| | | | | | -- * Documentation typo that caused jsdoc to exit with an error
* js: add with-sec-fprs to getKeysArmoredMaximilian Krambach2018-07-121-6/+6
| | | | | | | | | | | | | | -- * Reflects the changes made to gpgme-json in commit 6cc842c9aa76d19448141e5117ac59452d7a1ff3. - getKeysArmored now returns an object with property 'armored' being the exported armored block, and an (optional) array of fingerprint strings for those keys that can be used in sign/encrypt operations as property 'secret_fprs'. With this, extensions such as mailvelope will be able to bulk fetch all necessary key information in one request.
* js: documentationMaximilian Krambach2018-07-101-20/+23
| | | | | | | | | | | | | | | | | | -- * Fixed errors: - src/Message.js post(): Set chunksize to defined default value instead of hardcoded - src/Keys.js: added getHasSecret() to refreshKey operation. * Reviewed and updated the documentation * non-documentation changes which do not affect functionality: - src/Errors: disabled a console.warn that is only useful for debugging - helpers.js: renamed "string" to "value" in isFingerprint and isLongId to avoid confusion - src/Keyring: prepare_sync, search are both explicitly set to false by default
* js: add Key lookupMaximilian Krambach2018-07-041-0/+3
| | | | | | | | | | | | -- * src/Keyring.js: getKeys() now has the option "search", which will trigger a remote lookup (as configured in gpg) for the string given as pattern. * src/permittedOperations: make use of the new 'locate' option in keylist * DemoExtension: Add a button for lookup, to demonstrate the functionality
* js: fixing Key import/export testMaximilian Krambach2018-07-031-1/+1
| | | | | | | | | | | | | | -- * BrowserTestExtension: - The KeyImport/Export test had some errors, which have now been fixed - The secret key used for the test examples is now placed more prominently, and a clarification added that decrypt tests will not work if this key is not imported. * permittedOperations.js: typo Thanks to [email protected] for the fixes
* js: getDefaultKey and verify fixMaximilian Krambach2018-06-131-1/+53
| | | | | | | | | | | | | | | | -- * DemoExtension/maindemo.js - added a Demo for retrieving the default signing key * src/Errors.js - add a new Error if no default key can be determined * src/Key.js added documentation and a TODO marker for hasSecret. * src/Keyring.js implemented getDefaultKey * src/permittedOperations.js: Added missing entry for verify, added config_opt
* js: Add key creation to KeyringMaximilian Krambach2018-06-111-2/+21
| | | | | | | | | | | -- * src/Keyring.js: Added method generateKey for new Keys Still TODO: Key length and some further testing. Automated testing does not work in this case, and gpgmejs will not be able to delete test keys again. * src/permittedOperations.js Added new method's definitions according to gpgme-json
* js: change chunksize handling and decodingMaximilian Krambach2018-06-081-45/+36
| | | | | | | | | | -- * the nativeApp now sends all data in one base64-encoded string, which needs reassembly, but in a much easier way now. * there are some new performance problems now, especially with decrypting data
* js: code cleanup (eslint)Maximilian Krambach2018-06-061-14/+21
| | | | | | | | -- * trying to stick to eslint from now on for readability * As some attribution was lost in previous git confusions, I added my name into some of the licence headers
* js: Keyring listing keysMaximilian Krambach2018-05-281-64/+110
| | | | | | | | | | | | | | | -- * implementing Keyring methods: - Keyring.getKeys: has an additional option that retrieves the armor and secret state once at the beginning. This is power hungry, but allows for Keys to be used directly (without querying gpgme-json each call) * permittedOperations.js: reflect recent changes in the native counterpart, adding more options * Key: adding two methods for retrieving the armored Key block and for finding out if the Key includes a secret subkey.
* js: implement Key handling (1)Maximilian Krambach2018-05-251-38/+57
| | | | | | | | | | | -- * 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
* js: adding sign methodMaximilian Krambach2018-05-241-1/+43
| | | | | | | -- * src/gpgmejs.js: method, update in src/permittedOperations * basic testing in BrowsertestExtension
* js: transfer encoding changesMaximilian Krambach2018-05-221-2/+2
| | | | | | | | | | | | -- * 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
* js: fixing errors found by testingMaximilian Krambach2018-05-041-20/+61
| | | | | | | | | | | | | -- * 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: more testingMaximilian Krambach2018-04-271-24/+74
| | | | | | | | | | | | | | | -- * 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: Configuration and Error handlingMaximilian Krambach2018-04-251-2/+50
| | | | | | | | | | | | | | | | | | | -- * 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-251-0/+3
| | | | | | | | -- * 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: encrypt improvement and decrypt methodMaximilian Krambach2018-04-201-0/+75
* 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 --