[git] GPGME - branch, javascript-binding, updated. gpgme-1.11.1-104-g91c2362

[email protected] (by Maximilian Krambach)
Newsgroups gmane.comp.encryption.gpg.cvs
Message-ID <[email protected]>
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 <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.