diff options
author | job <job@cvs.openbsd.org> | 2021-05-06 17:03:58 +0000 |
---|---|---|
committer | job <job@cvs.openbsd.org> | 2021-05-06 17:03:58 +0000 |
commit | 1918f84c93a230f8e25ccdc6c7b78f628d4f1735 (patch) | |
tree | 7d0b1b75e0bfeaacfedb9256f4dc9229373d5ecc /regress/usr.sbin/rpki-client | |
parent | bddc19929f25e670f6554e53cd4baeb69aaea87c (diff) |
Add an 'expires' column to CSV & JSON output
The 'expires' value contains a reasonable earliest moment a VRP would expire,
in light of the currently available set of CAs and CRLs. The 'expires' value
can be used to avoid route selection based on stale data when generating VRP
sets, when faced with loss of communication between consumer and valdiator,
or validator and CA repository.
OK claudio@
Diffstat (limited to 'regress/usr.sbin/rpki-client')
-rw-r--r-- | regress/usr.sbin/rpki-client/Makefile.inc | 15 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/openssl11/Makefile | 1 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-roa.c | 10 |
3 files changed, 22 insertions, 4 deletions
diff --git a/regress/usr.sbin/rpki-client/Makefile.inc b/regress/usr.sbin/rpki-client/Makefile.inc index 5aa3cf9b843..5b2e6b5b48e 100644 --- a/regress/usr.sbin/rpki-client/Makefile.inc +++ b/regress/usr.sbin/rpki-client/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.9 2021/04/01 06:47:18 claudio Exp $ +# $OpenBSD: Makefile.inc,v 1.10 2021/05/06 17:03:57 job Exp $ .PATH: ${.CURDIR}/../../../../usr.sbin/rpki-client @@ -40,14 +40,23 @@ mft_gen.c: mft.c cat $> >> $@.tmp mv -f $@.tmp $@ -CLEANFILES += mft_gen.c mft_gen.c.tmp +# Provide missing prototypes for OpenSSL +roa_gen.c: roa.c + echo '#include <openssl/asn1.h>\n' > $@.tmp + echo 'int ASN1_time_parse(const char *, size_t, struct tm *, int);' \ + >> $@.tmp + echo 'int ASN1_time_tm_cmp(struct tm *, struct tm *);' >> $@.tmp + cat $> >> $@.tmp + mv -f $@.tmp $@ + +CLEANFILES += mft_gen.c mft_gen.c.tmp roa_gen.c roa_gen.c.tmp SRCS_test-mft+= test-mft.c mft_gen.c cms.c x509.c io.c log.c validate.c \ encoding.c dummy.c run-regress-test-mft: test-mft ./test-mft -v ${.CURDIR}/../mft/*.mft -SRCS_test-roa= test-roa.c roa.c cms.c x509.c ip.c as.c io.c log.c encoding.c +SRCS_test-roa+= test-roa.c roa_gen.c cms.c x509.c ip.c as.c io.c log.c encoding.c run-regress-test-roa: test-roa ./test-roa -v ${.CURDIR}/../roa/*.roa diff --git a/regress/usr.sbin/rpki-client/openssl11/Makefile b/regress/usr.sbin/rpki-client/openssl11/Makefile index 9481fa80e74..87b83348323 100644 --- a/regress/usr.sbin/rpki-client/openssl11/Makefile +++ b/regress/usr.sbin/rpki-client/openssl11/Makefile @@ -13,6 +13,7 @@ a_time_tm_gen.c: a_time_tm.c CLEANFILES += a_time_tm_gen.c a_time_tm_gen.c.tmp SRCS_test-mft = a_time_tm_gen.c o_time.c +SRCS_test-roa = a_time_tm_gen.c o_time.c CFLAGS += -I${.CURDIR}/../../../../lib/libcrypto/ .PATH: ${.CURDIR}/.. diff --git a/regress/usr.sbin/rpki-client/test-roa.c b/regress/usr.sbin/rpki-client/test-roa.c index 2f3c77b0f8b..da22e4b8b4d 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.10 2021/03/29 15:47:34 claudio Exp $ */ +/* $Id: test-roa.c,v 1.11 2021/05/06 17:03:57 job Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -32,6 +32,14 @@ #include "test-common.c" +#ifndef ASN1error +void +ASN1error(int err) +{ + ASN1err(0, err); +} +#endif + int verbose; static void |