提交 2cbc026b 编写于 作者: P Peter Krempa

qemu: command: Always setup TLS environment if src->haveTLS is on

We make sure that the disk supports TLS when preparing the environment
so there's no need to duplicate checks.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 867fb534
......@@ -766,8 +766,6 @@ qemuBuildTLSx509CommandLine(virCommandPtr cmd,
/* qemuBuildDiskSrcTLSx509CommandLine:
*
* Add TLS object if the disk src uses a secure communication channel
*
* Returns 0 on success, -1 w/ error on some sort of failure.
*/
......@@ -776,17 +774,12 @@ qemuBuildDiskSrcTLSx509CommandLine(virCommandPtr cmd,
virStorageSourcePtr src,
virQEMUCapsPtr qemuCaps)
{
if (src->haveTLS != VIR_TRISTATE_BOOL_YES)
return 0;
/* other protocols may be added later */
if (src->protocol == VIR_STORAGE_NET_PROTOCOL_VXHS &&
src->haveTLS == VIR_TRISTATE_BOOL_YES) {
return qemuBuildTLSx509CommandLine(cmd, src->tlsCertdir,
false, src->tlsVerify,
NULL, src->tlsAlias, qemuCaps);
}
return 0;
return qemuBuildTLSx509CommandLine(cmd, src->tlsCertdir,
false, src->tlsVerify,
NULL, src->tlsAlias, qemuCaps);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册