diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-18 18:05:59 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-18 18:05:59 +0200 |
commit | e03d031fe532360f82bfad3410ae0065d81091ad (patch) | |
tree | 4a9ed72ae52c06e38d5e63bdbf04367d56c3d510 | |
parent | fa664e82db94bff86f55b25c2afa11be83db1d16 (diff) | |
download | gnutls-e03d031fe532360f82bfad3410ae0065d81091ad.tar.gz |
tests: add correct time in pkcs7-gen
-rw-r--r-- | tests/pkcs7-gen.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pkcs7-gen.c b/tests/pkcs7-gen.c index f7c51a9afc..a96cef7f58 100644 --- a/tests/pkcs7-gen.c +++ b/tests/pkcs7-gen.c @@ -68,6 +68,16 @@ static char pem1_key[] = const gnutls_datum_t cert = {(void *) pem1_cert, sizeof(pem1_cert)-1}; const gnutls_datum_t key = {(void *) pem1_key, sizeof(pem1_key)-1}; +static time_t mytime(time_t * t) +{ + time_t then = 1199142000; + + if (t) + *t = then; + + return then; +} + static void tls_log_func(int level, const char *str) { fprintf(stderr, "%s |<%d>| %s", "err", level, str); @@ -89,6 +99,7 @@ void doit(void) char *oid; gnutls_datum_t data; + gnutls_global_set_time_function(mytime); gnutls_global_set_log_function(tls_log_func); if (debug) gnutls_global_set_log_level(6); |