|
|
d76c62 |
From 35ea15a7ddb570301c6dceb01e13e6f8ef6ba478 Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <35ea15a7ddb570301c6dceb01e13e6f8ef6ba478@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Mon, 16 Mar 2020 22:12:01 +0100
|
|
|
d76c62 |
Subject: [PATCH] qemu: block: Implement ssl verification configuration
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Allow disabling of SSL certificate validation for HTTPS and FTPS drives
|
|
|
d76c62 |
in qemu.
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit 304da9376c972413d77cc6c7f094a1b39d651ea8)
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1804750
|
|
|
d76c62 |
Message-Id: <a36c004cf393076f7d6cbfa377909c91b99e768d.1584391727.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/qemu/qemu_block.c | 1 +
|
|
|
d76c62 |
tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args | 3 ++-
|
|
|
d76c62 |
tests/qemuxml2argvdata/disk-network-http.xml | 1 +
|
|
|
d76c62 |
3 files changed, 4 insertions(+), 1 deletion(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
|
|
|
d76c62 |
index 5144cf266f..e60975a142 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_block.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_block.c
|
|
|
d76c62 |
@@ -713,6 +713,7 @@ qemuBlockStorageSourceGetCURLProps(virStorageSourcePtr src,
|
|
|
d76c62 |
"s:url", uristr,
|
|
|
d76c62 |
"S:username", username,
|
|
|
d76c62 |
"S:password-secret", passwordalias,
|
|
|
d76c62 |
+ "T:sslverify", src->sslverify,
|
|
|
d76c62 |
NULL));
|
|
|
d76c62 |
|
|
|
d76c62 |
return ret;
|
|
|
d76c62 |
diff --git a/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args
|
|
|
d76c62 |
index d39f357072..86e4597a81 100644
|
|
|
d76c62 |
--- a/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args
|
|
|
d76c62 |
+++ b/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args
|
|
|
d76c62 |
@@ -46,7 +46,8 @@ id=virtio-disk1 \
|
|
|
d76c62 |
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-2-format,\
|
|
|
d76c62 |
id=virtio-disk2 \
|
|
|
d76c62 |
-blockdev '{"driver":"https","url":"https://example.org:1234/test4.img",\
|
|
|
d76c62 |
-"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
|
|
|
d76c62 |
+"sslverify":false,"node-name":"libvirt-1-storage","auto-read-only":true,\
|
|
|
d76c62 |
+"discard":"unmap"}' \
|
|
|
d76c62 |
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
|
|
|
d76c62 |
"file":"libvirt-1-storage"}' \
|
|
|
d76c62 |
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=libvirt-1-format,\
|
|
|
d76c62 |
diff --git a/tests/qemuxml2argvdata/disk-network-http.xml b/tests/qemuxml2argvdata/disk-network-http.xml
|
|
|
d76c62 |
index 83a9865c83..8c475aec1d 100644
|
|
|
d76c62 |
--- a/tests/qemuxml2argvdata/disk-network-http.xml
|
|
|
d76c62 |
+++ b/tests/qemuxml2argvdata/disk-network-http.xml
|
|
|
d76c62 |
@@ -38,6 +38,7 @@
|
|
|
d76c62 |
<driver name='qemu' type='raw'/>
|
|
|
d76c62 |
<source protocol='https' name='test4.img'>
|
|
|
d76c62 |
<host name='example.org' port='1234'/>
|
|
|
d76c62 |
+ <ssl verify='no'/>
|
|
|
d76c62 |
</source>
|
|
|
d76c62 |
<target dev='vdd' bus='virtio'/>
|
|
|
d76c62 |
</disk>
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.1
|
|
|
d76c62 |
|