diff options
author | Maximilian Krambach <[email protected]> | 2018-04-27 18:03:09 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-04-27 18:03:09 +0000 |
commit | fda7b13f1b673962ce34b6f429158a7eb9cef47b (patch) | |
tree | 8b1f828c451c2d04ac5e8b311b7df27552405c59 /lang/js/src/gpgmejs_openpgpjs.js | |
parent | js: fixed empty operation setter in Message (diff) | |
download | gpgme-fda7b13f1b673962ce34b6f429158a7eb9cef47b.tar.gz gpgme-fda7b13f1b673962ce34b6f429158a7eb9cef47b.zip |
js: more testing
--
* 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
Diffstat (limited to '')
-rw-r--r-- | lang/js/src/gpgmejs_openpgpjs.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lang/js/src/gpgmejs_openpgpjs.js b/lang/js/src/gpgmejs_openpgpjs.js index cc2afde1..c80d5a86 100644 --- a/lang/js/src/gpgmejs_openpgpjs.js +++ b/lang/js/src/gpgmejs_openpgpjs.js @@ -109,7 +109,7 @@ return Promise.reject(GPMGEJS_Error('NOT_IMPLEMENTED')); } } - return this._GpgME.encrypt(data, translateKeyInput(publicKeys), wildcard); + return this._GpgME.encrypt(data, translateKeys(publicKeys), wildcard); } /** Decrypt Message @@ -201,6 +201,8 @@ class GPGME_Keyring_openpgpmode { // TODO: Can there be several default keys? return gpgme_error('TODO'); } + }, function(error){ + //TODO }); } @@ -264,6 +266,9 @@ class GPGME_Key_openpgpmode { * creates GPGME_Key_openpgpmode from GPGME_Keys */ function translateKeys(input){ + if (!input){ + return null; + } if (!Array.isArray(input)){ input = [input]; } |