aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/Keyring.js
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-09-19 09:51:31 +0000
committerWerner Koch <[email protected]>2018-09-19 09:51:31 +0000
commitc569adb5e3e3082bd68cdc34a2d349b7c28d3768 (patch)
tree90edc7ad677342709a74a978adb42db8e17c09f8 /lang/js/src/Keyring.js
parentjs: add configuration option on startup (diff)
downloadgpgme-c569adb5e3e3082bd68cdc34a2d349b7c28d3768.tar.gz
gpgme-c569adb5e3e3082bd68cdc34a2d349b7c28d3768.zip
json: Remove subkey-algo from createkey command.
* src/gpgme-json.c (op_createkey): Remove subkey-algo param. (GPG_AGENT_ALLOWS_KEYGEN_TRHOUGH_BROWSER): Fix typo. * lang/js/src/Keyring.js: Remove subkey-algo support. * lang/js/src/permittedOperations.js: Ditto. -- We do not want to expose details of the protocol's key generation and thus the subkey-algo does not make sense. Right now we support only the default and future-default algorithms. A user can configure them anyway using new-default-key-algo in gpg.conf. Eventually we may officially support a more flexible way of creating special structured OpenPGP keys but right now that is not part of the API. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'lang/js/src/Keyring.js')
-rw-r--r--lang/js/src/Keyring.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/lang/js/src/Keyring.js b/lang/js/src/Keyring.js
index e223284b..eec17116 100644
--- a/lang/js/src/Keyring.js
+++ b/lang/js/src/Keyring.js
@@ -387,13 +387,11 @@ export class GPGME_Keyring {
* values. If ommitted, 'default' is used.
* @param {Number} option.expires (optional) Expiration time in seconds
* from now. If not set or set to 0, expiration will be 'never'
- * @param {String} options.subkey_algo (optional) algorithm of the
- * encryption subkey. If ommited the same as algo is used.
*
* @return {Promise<Key|GPGME_Error>}
* @async
*/
- generateKey ({ userId, algo = 'default', expires= 0, subkey_algo } = {}){
+ generateKey ({ userId, algo = 'default', expires= 0 } = {}){
if (typeof userId !== 'string'
// eslint-disable-next-line no-use-before-define
|| (algo && supportedKeyAlgos.indexOf(algo) < 0 )
@@ -402,17 +400,11 @@ export class GPGME_Keyring {
return Promise.reject(gpgme_error('PARAM_WRONG'));
}
// eslint-disable-next-line no-use-before-define
- if (subkey_algo && supportedKeyAlgos.indexOf(subkey_algo) < 0){
- return Promise.reject(gpgme_error('PARAM_WRONG'));
- }
let me = this;
return new Promise(function (resolve, reject){
let msg = createMessage('createkey');
msg.setParameter('userid', userId);
msg.setParameter('algo', algo);
- if (subkey_algo) {
- msg.setParameter('subkey-algo',subkey_algo );
- }
msg.setParameter('expires', expires);
msg.post().then(function (response){
me.getKeys({