aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/Key.js
diff options
context:
space:
mode:
Diffstat (limited to 'lang/js/src/Key.js')
-rw-r--r--lang/js/src/Key.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lang/js/src/Key.js b/lang/js/src/Key.js
index 6d3cf17d..075a190e 100644
--- a/lang/js/src/Key.js
+++ b/lang/js/src/Key.js
@@ -35,13 +35,15 @@ import { Connection } from './Connection';
export function createKey(fingerprint, parent){
if (!isFingerprint(fingerprint)){
- return gpgme_error('KEY_INVALID');
+ return gpgme_error('PARAM_WRONG');
}
if ( parent instanceof Connection){
return new GPGME_Key(fingerprint, parent);
} else if ( parent.hasOwnProperty('connection') &&
parent.connection instanceof Connection){
return new GPGME_Key(fingerprint, parent.connection);
+ } else {
+ return gpgme_error('PARAM_WRONG');
}
}