aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/Key.js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-06-13 13:22:03 +0000
committerMaximilian Krambach <[email protected]>2018-06-13 13:22:03 +0000
commitaed402c5d572b60246f1f8e57ae269f8c91b0b7c (patch)
treedb92714ef1e5f2b9aafa819db5f9fd3c7dd45187 /lang/js/src/Key.js
parentjs: less confusing icons for test/Demo extension (diff)
downloadgpgme-aed402c5d572b60246f1f8e57ae269f8c91b0b7c.tar.gz
gpgme-aed402c5d572b60246f1f8e57ae269f8c91b0b7c.zip
js: getDefaultKey and verify fix
-- * DemoExtension/maindemo.js - added a Demo for retrieving the default signing key * src/Errors.js - add a new Error if no default key can be determined * src/Key.js added documentation and a TODO marker for hasSecret. * src/Keyring.js implemented getDefaultKey * src/permittedOperations.js: Added missing entry for verify, added config_opt
Diffstat (limited to 'lang/js/src/Key.js')
-rw-r--r--lang/js/src/Key.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lang/js/src/Key.js b/lang/js/src/Key.js
index 5986254e..3e4f1c78 100644
--- a/lang/js/src/Key.js
+++ b/lang/js/src/Key.js
@@ -192,6 +192,7 @@ export class GPGME_Key {
* Query the armored block of the non- secret parts of the Key directly
* from gpg.
* @returns {Promise<String>}
+ * @async
*/
getArmor(){
let me = this;
@@ -211,6 +212,13 @@ export class GPGME_Key {
});
}
+ /**
+ * Find out if the Key includes a secret part
+ * @returns {Promise<Boolean>}
+ *
+ * @async
+ */
+ // TODO: Does not work yet, result is always false
getHasSecret(){
let me = this;
return new Promise(function(resolve, reject) {