...
authorVolker Birk <vb@pep-project.org>
Mon, 20 Apr 2015 18:09:38 +0200
changeset 2035cbd324503c0
parent 202 4de298352d87
child 204 ae0785bb6409
...
src/pgp_gpg.c
     1.1 --- a/src/pgp_gpg.c	Mon Apr 20 17:55:32 2015 +0200
     1.2 +++ b/src/pgp_gpg.c	Mon Apr 20 18:09:38 2015 +0200
     1.3 @@ -1367,7 +1367,7 @@
     1.4                      handle->state = renew_error;
     1.5                      return GPG_ERR_GENERAL;
     1.6                  }
     1.7 -                write(fd, "2015-12-31\n", 11);
     1.8 +                write(fd, handle->date_ref, 11);
     1.9                  handle->state = renew_secret_key;
    1.10              }
    1.11              break;
    1.12 @@ -1403,7 +1403,7 @@
    1.13                      handle->state = renew_error;
    1.14                      return GPG_ERR_GENERAL;
    1.15                  }
    1.16 -                write(fd, "2015-12-31\n", 11);
    1.17 +                write(fd, handle->date_ref, 11);
    1.18                  handle->state = renew_quit;
    1.19              }
    1.20              break;
    1.21 @@ -1462,14 +1462,14 @@
    1.22      gpgme_key_t key;
    1.23      gpgme_data_t output;
    1.24      renew_state handle;
    1.25 -    char date_text[11];
    1.26 +    char date_text[12];
    1.27  
    1.28      assert(session);
    1.29      assert(fpr);
    1.30  
    1.31      memset(&handle, 0, sizeof(renew_state));
    1.32      handle.fpr_ref = fpr;
    1.33 -    snprintf(date_text, 11, "%.4d-%.2d-%.2d", ts->tm_year + 1900,
    1.34 +    snprintf(date_text, 12, "%.4d-%.2d-%.2d\n", ts->tm_year + 1900,
    1.35              ts->tm_mon + 1, ts->tm_mday);
    1.36      handle.date_ref = date_text;
    1.37