js: set expiry date on generateKey
-- * on the javascript side a Date is expected, gpggme-json expects seconds from 'now'
This commit is contained in:
parent
dd32daad0b
commit
91c2362550
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user