diff options
author | Maximilian Krambach <[email protected]> | 2018-06-13 13:22:03 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-06-13 13:22:03 +0000 |
commit | aed402c5d572b60246f1f8e57ae269f8c91b0b7c (patch) | |
tree | db92714ef1e5f2b9aafa819db5f9fd3c7dd45187 /lang/js/src/permittedOperations.js | |
parent | js: less confusing icons for test/Demo extension (diff) | |
download | gpgme-aed402c5d572b60246f1f8e57ae269f8c91b0b7c.tar.gz gpgme-aed402c5d572b60246f1f8e57ae269f8c91b0b7c.zip |
js: getDefaultKey and verify fix
--
* 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
Diffstat (limited to 'lang/js/src/permittedOperations.js')
-rw-r--r-- | lang/js/src/permittedOperations.js | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/lang/js/src/permittedOperations.js b/lang/js/src/permittedOperations.js index 91612ada..044ae4af 100644 --- a/lang/js/src/permittedOperations.js +++ b/lang/js/src/permittedOperations.js @@ -314,7 +314,7 @@ export const permittedOperations = { }, createkey: { - pinentry: true, + pinentry: true, required: { userid: { allowed: ['string'] @@ -332,7 +332,59 @@ export const permittedOperations = { type: [''], data: {'fingerprint': 'string'} } + }, + + verify: { + required: { + data: { + allowed: ['string'] + } + }, + optional: { + 'protocol': { + allowed: ['string'], + allowed_data: ['cms', 'openpgp'] + }, + 'signature': { + allowed: ['string'] + }, + 'base64':{ + allowed: ['boolean'] + } + }, + answer: { + type: ['plaintext'], + data:{ + data: 'string', + base64:'boolean', + info: 'object' + // file_name: Optional string of the plaintext file name. + // is_mime: Boolean if the messages claims it is MIME. + // signatures: Array of signatures + } + } + }, + + config_opt: { + required: { + 'component':{ + allowed: ['string'], + // allowed_data: ['gpg'] // TODO check all available + }, + 'option': { + allowed: ['string'], + // allowed_data: ['default-key'] // TODO check all available + } + }, + optional: {}, + answer: { + type: [], + data: { + option: 'object' + } + } } + /** * TBD handling of secrets * TBD key modification? |