From e97e6c06e950cfad424e120f4f3752b594214c94 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Mon, 11 Jun 2018 12:08:50 +0200 Subject: js: Add key creation to Keyring -- * 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 --- lang/js/src/permittedOperations.js | 23 +++++++++++++++++++++-- 1 file changed, 21 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 6ac33af9..91612ada 100644 --- a/lang/js/src/permittedOperations.js +++ b/lang/js/src/permittedOperations.js @@ -311,12 +311,31 @@ export const permittedOperations = { 'info': 'object' } } - } + }, + createkey: { + pinentry: true, + required: { + userid: { + allowed: ['string'] + } + }, + optional: { + algo: { + allowed: ['string'] + }, + expires: { + allowed: ['number'], + } + }, + answer: { + type: [''], + data: {'fingerprint': 'string'} + } + } /** * TBD handling of secrets * TBD key modification? - * TBD: key generation */ }; -- cgit v1.2.3