[PATCH 18/30] qemu: block: Implement ssl verification configuration

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

 



Allow disabling of SSL certificate validation for HTTPS and FTPS drives
in qemu.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_block.c                                       | 1 +
 tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args | 3 ++-
 tests/qemuxml2argvdata/disk-network-http.xml                | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 0357815b07..6bfd46a489 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -713,6 +713,7 @@ qemuBlockStorageSourceGetCURLProps(virStorageSourcePtr src,
                                           "s:url", uristr,
                                           "S:username", username,
                                           "S:password-secret", passwordalias,
+                                          "T:sslverify", src->sslverify,
                                           NULL));

     return ret;
diff --git a/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args
index 61daecf6f1..a700c26bf6 100644
--- a/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args
@@ -47,7 +47,8 @@ id=virtio-disk1 \
 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-2-format,\
 id=virtio-disk2 \
 -blockdev '{"driver":"https","url":"https://example.org:1234/test4.img",\
-"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+"sslverify":false,"node-name":"libvirt-1-storage","auto-read-only":true,\
+"discard":"unmap"}' \
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
 "file":"libvirt-1-storage"}' \
 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=libvirt-1-format,\
diff --git a/tests/qemuxml2argvdata/disk-network-http.xml b/tests/qemuxml2argvdata/disk-network-http.xml
index 83a9865c83..8c475aec1d 100644
--- a/tests/qemuxml2argvdata/disk-network-http.xml
+++ b/tests/qemuxml2argvdata/disk-network-http.xml
@@ -38,6 +38,7 @@
       <driver name='qemu' type='raw'/>
       <source protocol='https' name='test4.img'>
         <host name='example.org' port='1234'/>
+        <ssl verify='no'/>
       </source>
       <target dev='vdd' bus='virtio'/>
     </disk>
-- 
2.24.1





[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