From 1fb310cabe578625f96fce5d84ff6f0092c08d24 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Wed, 25 Apr 2018 15:59:36 +0200 Subject: js: Configuration and Error handling -- * 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 --- lang/js/src/permittedOperations.js | 52 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) (limited to 'lang/js/src/permittedOperations.js') diff --git a/lang/js/src/permittedOperations.js b/lang/js/src/permittedOperations.js index 892f4f2e..79e74223 100644 --- a/lang/js/src/permittedOperations.js +++ b/lang/js/src/permittedOperations.js @@ -31,7 +31,7 @@ partial and in need of concatenation params: Array Information that do not change throughout the message - infos: Array arbitrary information that may change + infos: Array<*> arbitrary information that may result in a list } } */ @@ -72,7 +72,55 @@ export const permittedOperations = { type: ['plaintext'], data: ['data'], params: ['base64', 'mime'], - infos: ['info'] + infos: [] // pending. Info about signatures and validity + //signature: [{Key Fingerprint, valid Boolean}] + } + }, + /** + keyinfo: { // querying the Key's information. + required: ['fingerprint'], + anser: { + type: ['TBD'], + data: [], + params: ['hasSecret', 'isRevoked', 'isExpired', 'armored', + 'timestamp', 'expires', 'pubkey_algo'], + infos: ['subkeys', 'userIds'] + }*/ + + /** + listkeys:{ + optional: ['with-secret', 'pattern'], + answer: { + type: ['TBD'], //Array of fingerprints? + infos: ['TBD'] //the property with infos + }, + */ + + /** + importkey: { + required: ['keyarmored'], + answer: { + type: ['TBD'], + infos: [''], // for each key if import was a success, if it was an update + } + }, + */ + + /** + deletekey: { + required: ['fingerprint'], + answer: { + type ['TBD'], + infos: [''] //success:true? in gpgme, an error NO_ERROR is returned } } + */ + + /** + *get armored secret different treatment from keyinfo! + */ + + /** + * TBD key modification requests? + */ } -- cgit v1.2.3