aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/Helpers.js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-08-17 12:40:27 +0000
committerMaximilian Krambach <[email protected]>2018-08-17 12:40:27 +0000
commit754e799d35fd62d7a979452f44342934659908c7 (patch)
tree4c16eea728543c50fd747220c755c4e980885d21 /lang/js/src/Helpers.js
parentjs: importKey feedback refactor (diff)
downloadgpgme-754e799d35fd62d7a979452f44342934659908c7.tar.gz
gpgme-754e799d35fd62d7a979452f44342934659908c7.zip
js: disallow bulk set data on key from outside
-- * src/Key.js Key class is not exported anymore, as it should not be used directly anywhere. setKeyData is no more a method of the Key, (optional) data are now validated and set on Key creation and on updates, both from within this module, thus no longer exposing setKeyData to the outside. * createKey now gained an optional parameter which allows to set Key data at this point.
Diffstat (limited to 'lang/js/src/Helpers.js')
-rw-r--r--lang/js/src/Helpers.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lang/js/src/Helpers.js b/lang/js/src/Helpers.js
index 0fd14994..accc2af5 100644
--- a/lang/js/src/Helpers.js
+++ b/lang/js/src/Helpers.js
@@ -22,7 +22,6 @@
*/
import { gpgme_error } from './Errors';
-import { GPGME_Key } from './Key';
/**
* Tries to return an array of fingerprints, either from input fingerprints or
@@ -50,7 +49,7 @@ export function toKeyIdArray(input){
}
} else if (typeof(input[i]) === 'object'){
let fpr = '';
- if (input[i] instanceof GPGME_Key){
+ if (input[i].hasOwnProperty('fingerprint')){
fpr = input[i].fingerprint;
} else if (input[i].hasOwnProperty('primaryKey') &&
input[i].primaryKey.hasOwnProperty('getFingerprint')){