[git] GPGME - branch, javascript-binding, updated. gpgme-1.11.1-104-g91c2362
by Maximilian Krambach
cvs at cvs.gnupg.org
Mon Aug 20 17:46:05 CEST 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".
The branch, javascript-binding has been updated
via 91c2362550f787cc28d764c0e571e911c740f74f (commit)
from dd32daad0bb21e3d5567326d0b2e548ff8510431 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 91c2362550f787cc28d764c0e571e911c740f74f
Author: Maximilian Krambach <maximilian.krambach at intevation.de>
Date: Mon Aug 20 17:46:29 2018 +0200
js: set expiry date on generateKey
--
* on the javascript side a Date is expected, gpggme-json expects
seconds from 'now'
diff --git a/lang/js/src/Keyring.js b/lang/js/src/Keyring.js
index 90d267d..7d9b370 100644
--- a/lang/js/src/Keyring.js
+++ b/lang/js/src/Keyring.js
@@ -388,8 +388,9 @@ export class GPGME_Keyring {
msg.setParameter('userid', userId);
msg.setParameter('algo', algo );
if (expires){
+ const now = new Date();
msg.setParameter('expires',
- Math.floor(expires.valueOf()/1000));
+ Math.floor((expires - now) /1000));
} else {
msg.setParameter('expires', 0);
}
-----------------------------------------------------------------------
Summary of changes:
lang/js/src/Keyring.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list