diff options
author | Andreas Metzler <ametzler@bebt.de> | 2023-08-14 17:27:16 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2023-08-14 18:05:26 +0100 |
commit | 36bc854c86908ee921225c1d30e35c4d59eed822 (patch) | |
tree | 9f4268d7ba065056d4b364d95ea304260c4d3a30 | |
parent | cd6ab265aa53f6bc030e5dfaf113f45d182be40c (diff) |
GnuTLS: fix autogen cert expiry date. Bug 3014
Broken-by: 48e9099006
-rw-r--r-- | doc/doc-txt/ChangeLog | 3 | ||||
-rw-r--r-- | src/src/tls-gnu.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index efdc228b6..aa1db1dfe 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -176,6 +176,9 @@ JH/33 Fix free for live variable $value created by a ${run ...} expansion. JH/34 Bug 3013: Fix use of $recipients within arguments for ${run...}. In 4.96 this would expand to empty. +JH/35 Bug 3014: GnuTLS: fix expiry date for an auto-generated server + certificate. Find and fix by Andreas Metzler. + Exim version 4.96 ----------------- diff --git a/src/src/tls-gnu.c b/src/src/tls-gnu.c index dd70e73e1..e706b6386 100644 --- a/src/src/tls-gnu.c +++ b/src/src/tls-gnu.c @@ -1016,7 +1016,7 @@ now = 1; if ( (rc = gnutls_x509_crt_set_version(cert, 3)) || (rc = gnutls_x509_crt_set_serial(cert, &now, sizeof(now))) || (rc = gnutls_x509_crt_set_activation_time(cert, now = time(NULL))) - || (rc = gnutls_x509_crt_set_expiration_time(cert, (long)2 * 60 * 60)) /* 2 hour */ + || (rc = gnutls_x509_crt_set_expiration_time(cert, now + (long)2 * 60 * 60)) /* 2 hour */ || (rc = gnutls_x509_crt_set_key(cert, pkey)) || (rc = gnutls_x509_crt_set_dn_by_oid(cert, |