diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-05-30 12:14:49 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-05-30 12:14:49 +0000 |
commit | db4edd41d3ba3d68c32cf26f7f1335ae8455f641 (patch) | |
tree | 41b75ab1b9e0e268f929ffb23377b65a488db0b6 /regress/usr.sbin | |
parent | 7a414d19c7705f7aec83348388a4be3f581af55d (diff) |
Revert commitid ANSBO0rBvIUtTi45:
Make rpki-client choose the verification time of the time it is invoked
rather than always getting the current system time for every certificate
verification. This will result in output that is not variable on run-time.
Using the time of invocation does not work well with fast publishing CAs. It
can take a few minutes to reach a repo and that CA may have issued certificates
that are not yet valid if that startup time of rpki-client is used to validate.
This still keeps the -P option to specify a fixed validation time.
OK beck@ job@ tb@
Diffstat (limited to 'regress/usr.sbin')
-rw-r--r-- | regress/usr.sbin/rpki-client/test-aspa.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-cert.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-gbr.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-geofeed.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-ip.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-mft.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-roa.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-rrdp.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-rsc.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-tak.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-tal.c | 10 |
11 files changed, 77 insertions, 33 deletions
diff --git a/regress/usr.sbin/rpki-client/test-aspa.c b/regress/usr.sbin/rpki-client/test-aspa.c index 1540751808f..88556a80367 100644 --- a/regress/usr.sbin/rpki-client/test-aspa.c +++ b/regress/usr.sbin/rpki-client/test-aspa.c @@ -1,4 +1,4 @@ -/* $Id: test-aspa.c,v 1.4 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-aspa.c,v 1.5 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2022 Job Snijders <job@fastly.com> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> @@ -35,8 +35,6 @@ int outformats; int verbose; int filemode; -int64_t evaluation_time; - int main(int argc, char *argv[]) { @@ -98,3 +96,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-cert.c b/regress/usr.sbin/rpki-client/test-cert.c index e9998c30fb3..e17b55f7931 100644 --- a/regress/usr.sbin/rpki-client/test-cert.c +++ b/regress/usr.sbin/rpki-client/test-cert.c @@ -1,4 +1,4 @@ -/* $Id: test-cert.c,v 1.22 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-cert.c,v 1.23 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -36,8 +36,6 @@ int outformats; int verbose; int filemode; -int64_t evaluation_time; - int main(int argc, char *argv[]) { @@ -127,3 +125,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-gbr.c b/regress/usr.sbin/rpki-client/test-gbr.c index 36a4bbb9a3e..be76feed86b 100644 --- a/regress/usr.sbin/rpki-client/test-gbr.c +++ b/regress/usr.sbin/rpki-client/test-gbr.c @@ -1,4 +1,4 @@ -/* $Id: test-gbr.c,v 1.14 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-gbr.c,v 1.15 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -34,8 +34,6 @@ int outformats; int verbose; int filemode; -int64_t evaluation_time; - int main(int argc, char *argv[]) { @@ -98,3 +96,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-geofeed.c b/regress/usr.sbin/rpki-client/test-geofeed.c index 9490f5f5922..9a17c340c85 100644 --- a/regress/usr.sbin/rpki-client/test-geofeed.c +++ b/regress/usr.sbin/rpki-client/test-geofeed.c @@ -1,4 +1,4 @@ -/* $Id: test-geofeed.c,v 1.3 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-geofeed.c,v 1.4 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -34,8 +34,6 @@ int outformats; int verbose; int filemode; -int64_t evaluation_time; - int main(int argc, char *argv[]) { @@ -98,3 +96,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-ip.c b/regress/usr.sbin/rpki-client/test-ip.c index f208d6a8953..b214ef589e1 100644 --- a/regress/usr.sbin/rpki-client/test-ip.c +++ b/regress/usr.sbin/rpki-client/test-ip.c @@ -1,4 +1,4 @@ -/* $Id: test-ip.c,v 1.8 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-ip.c,v 1.9 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -35,8 +35,6 @@ int outformats; int verbose; int filemode; -int64_t evaluation_time; - static void test(const char *res, uint16_t afiv, size_t sz, size_t unused, ...) { @@ -130,3 +128,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-mft.c b/regress/usr.sbin/rpki-client/test-mft.c index 16d47b549f6..f975c8496e5 100644 --- a/regress/usr.sbin/rpki-client/test-mft.c +++ b/regress/usr.sbin/rpki-client/test-mft.c @@ -1,4 +1,4 @@ -/* $Id: test-mft.c,v 1.24 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-mft.c,v 1.25 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -36,8 +36,6 @@ int outformats; int verbose; -int64_t evaluation_time; - int main(int argc, char *argv[]) { @@ -99,3 +97,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-roa.c b/regress/usr.sbin/rpki-client/test-roa.c index 97e95f61fa8..1ca25adf341 100644 --- a/regress/usr.sbin/rpki-client/test-roa.c +++ b/regress/usr.sbin/rpki-client/test-roa.c @@ -1,4 +1,4 @@ -/* $Id: test-roa.c,v 1.22 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-roa.c,v 1.23 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -34,8 +34,6 @@ int outformats; int verbose; int filemode; -int64_t evaluation_time; - int main(int argc, char *argv[]) { @@ -97,3 +95,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-rrdp.c b/regress/usr.sbin/rpki-client/test-rrdp.c index f50a4af2f00..abcd843d53f 100644 --- a/regress/usr.sbin/rpki-client/test-rrdp.c +++ b/regress/usr.sbin/rpki-client/test-rrdp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test-rrdp.c,v 1.5 2023/04/27 08:37:53 beck Exp $ */ +/* $OpenBSD: test-rrdp.c,v 1.6 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com> * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org> @@ -37,8 +37,6 @@ int verbose; -int64_t evaluation_time; - #define REGRESS_NOTIFY_URI "https://rpki.example.com/notify.xml" #define MAX_SESSIONS 12 @@ -340,3 +338,9 @@ usage: "-d | -n | -s\n", "test-rrdp"); exit(1); } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-rsc.c b/regress/usr.sbin/rpki-client/test-rsc.c index edc90c57323..77c6b004da0 100644 --- a/regress/usr.sbin/rpki-client/test-rsc.c +++ b/regress/usr.sbin/rpki-client/test-rsc.c @@ -1,4 +1,4 @@ -/* $Id: test-rsc.c,v 1.7 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-rsc.c,v 1.8 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -37,8 +37,6 @@ int outformats; int verbose; int filemode; -int64_t evaluation_time; - int main(int argc, char *argv[]) { @@ -100,3 +98,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-tak.c b/regress/usr.sbin/rpki-client/test-tak.c index c84a9dfd50b..87d2b4474ea 100644 --- a/regress/usr.sbin/rpki-client/test-tak.c +++ b/regress/usr.sbin/rpki-client/test-tak.c @@ -1,4 +1,4 @@ -/* $Id: test-tak.c,v 1.4 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-tak.c,v 1.5 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2022 Job Snijders <job@fastly.com> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> @@ -35,8 +35,6 @@ int outformats; int verbose; int filemode; -int64_t evaluation_time; - int main(int argc, char *argv[]) { @@ -98,3 +96,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} diff --git a/regress/usr.sbin/rpki-client/test-tal.c b/regress/usr.sbin/rpki-client/test-tal.c index bac51e40363..3d9eb351f7c 100644 --- a/regress/usr.sbin/rpki-client/test-tal.c +++ b/regress/usr.sbin/rpki-client/test-tal.c @@ -1,4 +1,4 @@ -/* $Id: test-tal.c,v 1.11 2023/04/27 08:37:53 beck Exp $ */ +/* $Id: test-tal.c,v 1.12 2023/05/30 12:14:48 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -32,8 +32,6 @@ int outformats; int verbose; -int64_t evaluation_time; - int main(int argc, char *argv[]) { @@ -82,3 +80,9 @@ main(int argc, char *argv[]) printf("OK\n"); return 0; } + +time_t +get_current_time(void) +{ + return time(NULL); +} |