storage_source: Add 'tlsHostname' field to virStorageSource

The value will be used to override the hostname used for validation of
TLS certificates.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-03-10 09:51:49 +01:00
parent 19faa6f01a
commit 47abbe0fd7
2 changed files with 5 additions and 0 deletions

View File

@ -827,6 +827,7 @@ virStorageSourceCopy(const virStorageSource *src,
def->compat = g_strdup(src->compat);
def->tlsAlias = g_strdup(src->tlsAlias);
def->tlsCertdir = g_strdup(src->tlsCertdir);
def->tlsHostname = g_strdup(src->tlsHostname);
def->query = g_strdup(src->query);
if (src->sliceStorage)
@ -1137,6 +1138,7 @@ virStorageSourceClear(virStorageSource *def)
VIR_FREE(def->tlsAlias);
VIR_FREE(def->tlsCertdir);
VIR_FREE(def->tlsHostname);
VIR_FREE(def->ssh_user);

View File

@ -358,6 +358,9 @@ struct _virStorageSource {
char *tlsAlias;
char *tlsCertdir;
/* TLS hostname override */
char *tlsHostname;
bool detected; /* true if this entry was not provided by the user */
unsigned int debugLevel;