mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
qemu: hotplug: Remove TLS alias generation from qemuDomainGetTLSObjects
Callers should generate the alias separately. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6dc2059abe
commit
903ba2e807
@ -166,7 +166,7 @@ qemuDomainAddDiskSrcTLSObject(virQEMUDriverPtr driver,
|
||||
src->tlsCertdir,
|
||||
false,
|
||||
src->tlsVerify,
|
||||
NULL, &tlsProps, NULL, NULL) < 0)
|
||||
&tlsProps, NULL) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuDomainAddTLSObjects(driver, vm, QEMU_ASYNC_JOB_NONE,
|
||||
@ -1498,9 +1498,7 @@ qemuDomainGetTLSObjects(virQEMUCapsPtr qemuCaps,
|
||||
const char *tlsCertdir,
|
||||
bool tlsListen,
|
||||
bool tlsVerify,
|
||||
const char *srcAlias,
|
||||
virJSONValuePtr *tlsProps,
|
||||
char **tlsAlias,
|
||||
virJSONValuePtr *secProps)
|
||||
{
|
||||
const char *secAlias = NULL;
|
||||
@ -1516,10 +1514,6 @@ qemuDomainGetTLSObjects(virQEMUCapsPtr qemuCaps,
|
||||
secAlias, qemuCaps, tlsProps) < 0)
|
||||
return -1;
|
||||
|
||||
if (tlsAlias &&
|
||||
!(*tlsAlias = qemuAliasTLSObjFromSrcAlias(srcAlias)))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1559,12 +1553,14 @@ qemuDomainAddChardevTLSObjects(virQEMUDriverPtr driver,
|
||||
if (secinfo)
|
||||
*secAlias = secinfo->s.aes.alias;
|
||||
|
||||
if (!(*tlsAlias = qemuAliasTLSObjFromSrcAlias(charAlias)))
|
||||
goto cleanup;
|
||||
|
||||
if (qemuDomainGetTLSObjects(priv->qemuCaps, secinfo,
|
||||
cfg->chardevTLSx509certdir,
|
||||
dev->data.tcp.listen,
|
||||
cfg->chardevTLSx509verify,
|
||||
charAlias, &tlsProps, tlsAlias,
|
||||
&secProps) < 0)
|
||||
&tlsProps, &secProps) < 0)
|
||||
goto cleanup;
|
||||
dev->data.tcp.tlscreds = true;
|
||||
|
||||
|
@ -53,9 +53,7 @@ int qemuDomainGetTLSObjects(virQEMUCapsPtr qemuCaps,
|
||||
const char *tlsCertdir,
|
||||
bool tlsListen,
|
||||
bool tlsVerify,
|
||||
const char *srcAlias,
|
||||
virJSONValuePtr *tlsProps,
|
||||
char **tlsAlias,
|
||||
virJSONValuePtr *secProps);
|
||||
|
||||
int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
|
||||
|
@ -856,11 +856,13 @@ qemuMigrationParamsEnableTLS(virQEMUDriverPtr driver,
|
||||
secAlias = priv->migSecinfo->s.aes.alias;
|
||||
}
|
||||
|
||||
if (!(*tlsAlias = qemuAliasTLSObjFromSrcAlias(QEMU_MIGRATION_TLS_ALIAS_BASE)))
|
||||
goto error;
|
||||
|
||||
if (qemuDomainGetTLSObjects(priv->qemuCaps, priv->migSecinfo,
|
||||
cfg->migrateTLSx509certdir, tlsListen,
|
||||
cfg->migrateTLSx509verify,
|
||||
QEMU_MIGRATION_TLS_ALIAS_BASE,
|
||||
&tlsProps, tlsAlias, &secProps) < 0)
|
||||
&tlsProps, &secProps) < 0)
|
||||
goto error;
|
||||
|
||||
/* Ensure the domain doesn't already have the TLS objects defined...
|
||||
|
Loading…
x
Reference in New Issue
Block a user