js: don't expire new keys if no date is set
authorMaximilian Krambach <maximilian.krambach@intevation.de>
Fri, 17 Aug 2018 15:20:35 +0000 (17:20 +0200)
committerMaximilian Krambach <maximilian.krambach@intevation.de>
Fri, 17 Aug 2018 15:20:35 +0000 (17:20 +0200)
--

* src/Keyring.js A new Key without expiration is documented as
  'never expire' here, and should behave accordingly. This requires
  sending '0' here.

lang/js/src/Keyring.js

index 766bab1..d18fb64 100644 (file)
@@ -390,6 +390,8 @@ export class GPGME_Keyring {
                 if (expires){
                     msg.setParameter('expires',
                         Math.floor(expires.valueOf()/1000));
+                } else {
+                    msg.setParameter('expires', 0);
                 }
                 msg.post().then(function(response){
                     me.getKeys(response.fingerprint, true).then(