[PATCH 04/10] storage_source: Add 'tlsHostname' field to virStorageSource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/conf/storage_source_conf.c | 2 ++
 src/conf/storage_source_conf.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/conf/storage_source_conf.c b/src/conf/storage_source_conf.c
index 5c5422ab0c..1a7284ec12 100644
--- a/src/conf/storage_source_conf.c
+++ b/src/conf/storage_source_conf.c
@@ -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);

diff --git a/src/conf/storage_source_conf.h b/src/conf/storage_source_conf.h
index c720d093be..2fc9cc6518 100644
--- a/src/conf/storage_source_conf.h
+++ b/src/conf/storage_source_conf.h
@@ -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;
-- 
2.35.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux