[PATCH 3/3] tests: uri: Add test for urlencoded URIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When specifying extra params for spcie TLS verification, it's necessary
to pass a weird URI to it. Let's add a test for this case where the TLS
string contains a space.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/viruritest.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/viruritest.c b/tests/viruritest.c
index 04c237832d..c09e5323bc 100644
--- a/tests/viruritest.c
+++ b/tests/viruritest.c
@@ -178,6 +178,14 @@ mymain(void)
     TEST_PARSE("test://[2001:41c8:1:4fd4::2]:123/system", "test", "2001:41c8:1:4fd4::2", 123, "/system", NULL, NULL, NULL, NULL);
     TEST_PARSE("gluster+rdma://example.com:1234/gv0/vol.img", "gluster+rdma", "example.com", 1234, "/gv0/vol.img", NULL, NULL, NULL, NULL);

+    virURIParam spiceparams[] = {
+        { (char *) "tlsSubject", (char *) "C=XX,L=Testtown,O=Test Company,CN=tester.test", false },
+        { NULL, NULL, false },
+    };
+    TEST_FULL("spice://[3ffe::104]:5900/?tlsSubject=C=XX,L=Testtown,O=Test%20Company,CN=tester.test",
+              "spice://[3ffe::104]:5900/?tlsSubject=C%3dXX%2cL%3dTesttown%2cO%3dTest%20Company%2cCN%3dtester%2etest",
+              "spice", "3ffe::104", 5900, "/", "tlsSubject=C=XX,L=Testtown,O=Test%20Company,CN=tester.test", NULL, NULL, spiceparams);
+
     virURIParam params1[] = {
         { (char*)"foo", (char*)"one", false },
         { (char*)"bar", (char*)"two", false },
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux