diff options
author | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2020-04-05 15:09:57 +0200 |
---|---|---|
committer | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2020-04-05 18:25:51 +0200 |
commit | ed208fe55f31478732fd6cc394f9576b315a42cd (patch) | |
tree | d1d894929021723018a3254c11c9123ff02d40a2 /tests | |
parent | a2255cb259b5b7df76cd47b27410ee87ffe5eac0 (diff) | |
download | gnutls-ed208fe55f31478732fd6cc394f9576b315a42cd.tar.gz |
tests: Fix status-request-revoked after 2020-10-24
included certs expire 2020-10-24 so this test fails after that date.
Fixes #967
This patch was done while working on reproducible builds for openSUSE.
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/status-request-revoked.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/status-request-revoked.c b/tests/status-request-revoked.c index b4033214cb..0268934647 100644 --- a/tests/status-request-revoked.c +++ b/tests/status-request-revoked.c @@ -65,6 +65,16 @@ static void client_log_func(int level, const char *str) fprintf(stderr, "client|<%d>| %s", level, str); } +static time_t mytime(time_t * t) +{ + time_t then = 1586000000; + + if (t) + *t = then; + + return then; +} + static unsigned char server_cert_pem[] = "-----BEGIN CERTIFICATE-----\n" "MIIEKjCCAhKgAwIBAgIIRiBQA6KFBj0wDQYJKoZIhvcNAQELBQAwDzENMAsGA1UE\n" @@ -252,6 +262,7 @@ static int cert_verify_callback(gnutls_session_t session) unsigned int status; int ret; + gnutls_global_set_time_function(mytime); ret = gnutls_certificate_verify_peers2(session, &status); if (ret < 0) return -1; |