blob: 5aa3cf9b8439be856ec3a4478daa7cc95796a0dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# $OpenBSD: Makefile.inc,v 1.9 2021/04/01 06:47:18 claudio Exp $
.PATH: ${.CURDIR}/../../../../usr.sbin/rpki-client
PROGS += test-ip
PROGS += test-cert
PROGS += test-gbr
PROGS += test-mft
PROGS += test-roa
PROGS += test-tal
.for p in ${PROGS}
REGRESS_TARGETS += run-regress-$p
.endfor
CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../../usr.sbin/rpki-client
LDADD+= -lcrypto -lutil
DPADD+= ${LIBCRYPTO} ${LIBUTIL}
SRCS_test-ip= test-ip.c ip.c io.c
run-regress-test-ip: test-ip
./test-ip
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 \
validate.c encoding.c
run-regress-test-cert: test-cert
./test-cert -v ${.CURDIR}/../cer/*.cer
./test-cert -vt ${TALARGS:S,,${.CURDIR}/../&,}
# Provide missing prototypes for OpenSSL
mft_gen.c: mft.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
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
run-regress-test-roa: test-roa
./test-roa -v ${.CURDIR}/../roa/*.roa
SRCS_test-gbr= test-gbr.c gbr.c cms.c x509.c io.c log.c encoding.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 validate.c encoding.c dummy.c
run-regress-test-tal: test-tal
./test-tal -v ${.CURDIR}/../tal/*.tal
|