diff options
Diffstat (limited to 'tests/resource-set')
-rw-r--r-- | tests/resource-set/Makefile | 6 | ||||
-rw-r--r-- | tests/resource-set/resource-set-test.c | 4 | ||||
-rw-r--r-- | tests/resource-set/test.conf | 41 |
3 files changed, 46 insertions, 5 deletions
diff --git a/tests/resource-set/Makefile b/tests/resource-set/Makefile index fc3968dd..612b3259 100644 --- a/tests/resource-set/Makefile +++ b/tests/resource-set/Makefile @@ -18,9 +18,9 @@ clean: ${BIN}: ${OBJ} ${LIB} Makefile ${CC} -g -o $@ ${OBJ} ${LIB} -test: +test: ${BIN} test.conf @echo This test needs more work @echo '' - ${OPENSSL_DIR}/apps/openssl req -new -x509 -config rfc3779-test.conf -key rfc3779-test.key -out rfc3779-test.cert + ${OPENSSL_DIR}/apps/openssl req -new -x509 -config test.conf -keyout test.key -out test.cer -outform DER @echo '' - ./resource-set-test -v -a AS:17 -i IPv4:10.0.0.44 -p rfc3779-test.cert + ./${BIN} -v -a AS:17 -i IPv4:10.0.0.44 -d test.cer diff --git a/tests/resource-set/resource-set-test.c b/tests/resource-set/resource-set-test.c index 86049a4f..3d0b3ec1 100644 --- a/tests/resource-set/resource-set-test.c +++ b/tests/resource-set/resource-set-test.c @@ -118,13 +118,13 @@ int main(int argc, char *argv[]) } printf("Checking ASIdentifier coverage..."); - if (v3_asid_validate_resource_set(chain, asid)) + if (v3_asid_validate_resource_set(chain, asid, 0)) printf("covered\n"); else printf("NOT covered\n"); printf("Checking IPAddrBlock coverage..."); - if (v3_addr_validate_resource_set(chain, addr)) + if (v3_addr_validate_resource_set(chain, addr, 0)) printf("covered\n"); else printf("NOT covered\n"); diff --git a/tests/resource-set/test.conf b/tests/resource-set/test.conf new file mode 100644 index 00000000..161eb5be --- /dev/null +++ b/tests/resource-set/test.conf @@ -0,0 +1,41 @@ +# $Id$ + +[ req ] +default_bits = 1024 +encrypt_key = no +distinguished_name = req_dn +x509_extensions = req_x509_ext +prompt = no + +[ req_dn ] +C = US +ST = MA +L = Reading +O = Grunchweather Associates +OU = Software Engineering +CN = RFC3779 test cert +emailAddress = sra@hactrn.net + +[ req_x509_ext ] + +sbgp-autonomousSysNum = @asid_ext +sbgp-ipAddrBlock = @addr_ext + +[ asid_ext ] + +AS.0 = 1 +AS.1 = 3-22 +AS.2 = 2 +RDI.0 = inherit + +[ addr_ext ] + +IPv4-SAFI.0 = 1 : 10.0.0.6 /24 +IPv4.0 = 10.0.0.44 +IPv4.1 = 10.3.0.44 +IPv4.2 = 10.0.0.45 +IPv4.3 = 10.2.0.5 +IPv4.4 = 10.2.0.6- 10.3.0.0 +IPv6.0 = 2002:: +IPv6.1 = 2002::1 - 2002::14 +IPv6.2 = 2003::/33 |