]> git.ipfire.org Git - thirdparty/libvirt.git/commit
daemon: initialize GnuTLS
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 18 Aug 2011 08:44:08 +0000 (10:44 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 19 Aug 2011 08:58:51 +0000 (10:58 +0200)
commit74c75671331d284e1f777f9692b72e9737520bf0
tree0405a5b8ab909d7680e5dac5e0b4038d066560a5
parent4dec4d414f58e25bd483d400083198407da3ff99
daemon: initialize GnuTLS

When spice_tls is set but listen_tls is not, we don't initialize
GnuTLS library. So any later gnutls call (e.g. during migration,
where we initialize a certificate) will access uninitialized GnuTLS
internal structs and throws an error.

Although, we might now initialize GnuTLS twice, it is safe according
to the documentation:

    This function can be called many times,
    but will only do something the first time.

This patch creates 2 functions: virNetTLSInit and virNetTLSDeinit
with respect to written above.
daemon/libvirtd.c
src/rpc/virnettlscontext.c
src/rpc/virnettlscontext.h