diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 46f0bdd18c4f0299a5efd44efa51ec44ef7d6464..f68b82d08325ed8695a54df2df79ac2607b9a60d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -721,7 +721,7 @@ qemuBuildTLSx509BackendProps(const char *tlspath, if (virJSONValueObjectCreate(propsret, "s:dir", path, "s:endpoint", (isListen ? "server": "client"), - "b:verify-peer", verifypeer, + "b:verify-peer", (isListen ? verifypeer : true), NULL) < 0) goto cleanup; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args index 5aff7734e18522b04a97416d9fda5c8035fe2a6e..ab5f7e27f21010bb275137732aa201145d5eff71 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args @@ -26,7 +26,7 @@ server,nowait \ localport=1111 \ -device isa-serial,chardev=charserial0,id=serial0 \ -object tls-creds-x509,id=objcharserial1_tls0,dir=/etc/pki/libvirt-chardev,\ -endpoint=client,verify-peer=no \ +endpoint=client,verify-peer=yes \ -chardev socket,id=charserial1,host=127.0.0.1,port=5555,\ tls-creds=objcharserial1_tls0 \ -device isa-serial,chardev=charserial1,id=serial1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-secret-chardev.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-secret-chardev.args index 91f1fe0cdeb9fe8d5dd11fc4e6907374c76a9139..2567abbfad853fd790f903a4ff870e9e2a59d535 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-secret-chardev.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-secret-chardev.args @@ -31,7 +31,7 @@ localport=1111 \ data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ -object tls-creds-x509,id=objcharserial1_tls0,dir=/etc/pki/libvirt-chardev,\ -endpoint=client,verify-peer=no,passwordid=charserial1-secret0 \ +endpoint=client,verify-peer=yes,passwordid=charserial1-secret0 \ -chardev socket,id=charserial1,host=127.0.0.1,port=5555,\ tls-creds=objcharserial1_tls0 \ -device isa-serial,chardev=charserial1,id=serial1 \