Test that a non conforming xmlns attribute results in a failure.
authorclaudio <claudio@openbsd.org>
Fri, 4 Feb 2022 13:11:14 +0000 (13:11 +0000)
committerclaudio <claudio@openbsd.org>
Fri, 4 Feb 2022 13:11:14 +0000 (13:11 +0000)
regress/usr.sbin/rpki-client/Makefile.inc
regress/usr.sbin/rpki-client/rrdp/notification_xmlns.xml [new file with mode: 0644]
regress/usr.sbin/rpki-client/rrdp/rrdp-r7.out [new file with mode: 0644]

index a115532..d73cfe2 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.17 2022/02/04 13:05:47 claudio Exp $
+# $OpenBSD: Makefile.inc,v 1.18 2022/02/04 13:11:14 claudio Exp $
 
 .PATH:         ${.CURDIR}/../../../../usr.sbin/rpki-client
 
@@ -83,3 +83,7 @@ run-regress-test-rrdp: test-rrdp
        ./test-rrdp \
        -n < ${.CURDIR}/../rrdp/billion_lol.xml 2>&1 | tee rrdp-r6.out
        cmp ${.CURDIR}/../rrdp/rrdp-r6.out rrdp-r6.out
+
+       ./test-rrdp \
+       -n < ${.CURDIR}/../rrdp/notification_xmlns.xml 2>&1 | tee rrdp-r7.out
+       cmp ${.CURDIR}/../rrdp/rrdp-r7.out rrdp-r7.out
diff --git a/regress/usr.sbin/rpki-client/rrdp/notification_xmlns.xml b/regress/usr.sbin/rpki-client/rrdp/notification_xmlns.xml
new file mode 100644 (file)
index 0000000..f15bc25
--- /dev/null
@@ -0,0 +1,4 @@
+<notification xmlns="http://www.example.com/rpki/rrdp" version="1" session_id="8fe05c2e-047d-49e7-8398-cd4250a572b1" serial="50550">
+  <snapshot uri="https://rpki.example.com/8fe05c2e-047d-49e7-8398-cd4250a572b1/50550/snapshot.xml" hash="ae52f78bcb1b258a1da924122971b0fddfce4c01b2b2dba59c9b28ef1d94c02b" />
+  <delta serial="50550" uri="https://rpki.example.com/8fe05c2e-047d-49e7-8398-cd4250a572b1/50550/delta.xml" hash="e99cc80cb36259e73ec1ffed5a0cfbaf27d345800da18147dbdf8316b28e027c" />
+</notification>
diff --git a/regress/usr.sbin/rpki-client/rrdp/rrdp-r7.out b/regress/usr.sbin/rpki-client/rrdp/rrdp-r7.out
new file mode 100644 (file)
index 0000000..1826634
--- /dev/null
@@ -0,0 +1,2 @@
+test-rrdp: parse failed - non conforming attribute 'xmlns' found in notification elem
+test-rrdp: stdin: parse error at line 1: parsing aborted