From 743b73f428b86478e25cd3f69c90bf1f46a10f4a Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 5 Mar 2021 17:28:09 +0000 Subject: [PATCH] Fix regress tests after changes to tal.c, mft.c, and cert.c. --- regress/usr.sbin/rpki-client/Makefile.inc | 8 +++--- regress/usr.sbin/rpki-client/dummy.c | 34 +++++++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 regress/usr.sbin/rpki-client/dummy.c diff --git a/regress/usr.sbin/rpki-client/Makefile.inc b/regress/usr.sbin/rpki-client/Makefile.inc index a4553ea31d5..74d9ca85b3a 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.7 2021/02/16 08:53:53 job Exp $ +# $OpenBSD: Makefile.inc,v 1.8 2021/03/05 17:28:09 claudio Exp $ .PATH: ${.CURDIR}/../../../../usr.sbin/rpki-client @@ -25,7 +25,7 @@ TALARGS += ta/AfriNIC.cer tal/afrinic.tal TALARGS += ta/apnic-rpki-root-iana-origin.cer tal/apnic.tal TALARGS += ta/ripe-ncc-ta.cer tal/ripe.tal -SRCS_test-cert= test-cert.c cert.c x509.c ip.c as.c io.c log.c tal.c +SRCS_test-cert= test-cert.c cert.c x509.c ip.c as.c io.c log.c tal.c validate.c run-regress-test-cert: test-cert ./test-cert -v ${.CURDIR}/../cer/*.cer ./test-cert -vt ${TALARGS:S,,${.CURDIR}/../&,} @@ -41,7 +41,7 @@ mft_gen.c: mft.c CLEANFILES += mft_gen.c mft_gen.c.tmp -SRCS_test-mft+= test-mft.c mft_gen.c cms.c x509.c io.c log.c +SRCS_test-mft+= test-mft.c mft_gen.c cms.c x509.c io.c log.c validate.c dummy.c run-regress-test-mft: test-mft ./test-mft -v ${.CURDIR}/../mft/*.mft @@ -53,6 +53,6 @@ SRCS_test-gbr= test-gbr.c gbr.c cms.c x509.c io.c log.c run-regress-test-gbr: test-gbr ./test-gbr -v ${.CURDIR}/../gbr/*.gbr -SRCS_test-tal= test-tal.c tal.c io.c log.c +SRCS_test-tal= test-tal.c tal.c io.c log.c validate.c dummy.c run-regress-test-tal: test-tal ./test-tal -v ${.CURDIR}/../tal/*.tal diff --git a/regress/usr.sbin/rpki-client/dummy.c b/regress/usr.sbin/rpki-client/dummy.c new file mode 100644 index 00000000000..1d5f98ea7ac --- /dev/null +++ b/regress/usr.sbin/rpki-client/dummy.c @@ -0,0 +1,34 @@ +/* + * Public domain + * dummy shim for some tests. + */ + +#include "extern.h" + +struct auth * +auth_find(struct auth_tree *auths, const char *aki) +{ + return NULL; +} + +int +as_check_covered(uint32_t min, uint32_t max, + const struct cert_as *as, size_t asz) +{ + return -1; +} + +int +ip_addr_check_covered(enum afi afi, + const unsigned char *min, const unsigned char *max, + const struct cert_ip *ips, size_t ipsz) +{ + return -1; +} + +void +ip_addr_print(const struct ip_addr *addr, + enum afi afi, char *buf, size_t bufsz) +{ +} + -- 2.20.1