js: implement import/delete Key, some fixes
authorMaximilian Krambach <maximilian.krambach@intevation.de>
Wed, 6 Jun 2018 09:57:41 +0000 (11:57 +0200)
committerMaximilian Krambach <maximilian.krambach@intevation.de>
Wed, 6 Jun 2018 09:57:41 +0000 (11:57 +0200)
commit0356a667c5a8b4fdb4404cebb57475ed3f39ade9
tree60ca63e53480947677f3a4875dbc739e3e301c9a
parent332b4adbcc52ccf337cbc1943d5abef500769e10
js: implement import/delete Key, some fixes

--

* Keyring.js
   - implemented importKey: importing one or more armored public key
     blocks.
   - implemented deleteKey: deleting a public Key from gpg.

* Key.js renamed property Key.armor to Key.armored

* Helpers.js: toKeyIDArray does not complain anymore if there are no
  keys. Not having Keys in e.g. signing keys in encrypt is legitimate
  and common, the complaints were getting spammy

* Errors.js: gpgme_errors now always pass an optional additional
  message, for easier debugging in minified code

* Connection.js: Fix in gpgme-json responses containing objects

* eslintrc.json: Start using eslint. A cleanup to conform to it is not
  done yet

* Added further tests for the new functionality
12 files changed:
lang/js/.eslintrc.json [new file with mode: 0644]
lang/js/BrowserTestExtension/browsertest.html
lang/js/BrowserTestExtension/tests/KeyImportExport.js [new file with mode: 0644]
lang/js/BrowserTestExtension/tests/encryptDecryptTest.js
lang/js/BrowserTestExtension/tests/inputvalues.js
lang/js/src/Connection.js
lang/js/src/Errors.js
lang/js/src/Helpers.js
lang/js/src/Key.js
lang/js/src/Keyring.js
lang/js/unittest_inputvalues.js
lang/js/unittests.js