mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
daemon: Move TLS initialization to virInitialize
My previous patch 74c75671331d284e1f777f9692b72e9737520bf0 introduced a regression by removing TLS initialization from client.
This commit is contained in:
parent
b1643dc15c
commit
eaddec976e
@ -1516,7 +1516,6 @@ int main(int argc, char **argv) {
|
||||
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_START,
|
||||
0, "start", NULL);
|
||||
|
||||
virNetTLSInit();
|
||||
if (daemonSetupNetworking(srv, config,
|
||||
sock_file, sock_file_ro,
|
||||
ipsock, privileged) < 0) {
|
||||
@ -1555,7 +1554,6 @@ cleanup:
|
||||
virNetServerProgramFree(qemuProgram);
|
||||
virNetServerClose(srv);
|
||||
virNetServerFree(srv);
|
||||
virNetTLSDeinit();
|
||||
if (statuswrite != -1) {
|
||||
if (ret != 0) {
|
||||
/* Tell parent of daemon what failed */
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "memory.h"
|
||||
#include "configmake.h"
|
||||
#include "intprops.h"
|
||||
#include "rpc/virnettlscontext.h"
|
||||
|
||||
#ifndef WITH_DRIVER_MODULES
|
||||
# ifdef WITH_TEST
|
||||
@ -413,6 +414,8 @@ virInitialize(void)
|
||||
|
||||
virLogSetFromEnv();
|
||||
|
||||
virNetTLSInit();
|
||||
|
||||
VIR_DEBUG("register drivers");
|
||||
|
||||
#if HAVE_WINSOCK2_H
|
||||
|
@ -1410,11 +1410,3 @@ void virNetTLSInit(void)
|
||||
{
|
||||
gnutls_global_init();
|
||||
}
|
||||
|
||||
/*
|
||||
* See virNetTLSInit
|
||||
*/
|
||||
void virNetTLSDeinit(void)
|
||||
{
|
||||
gnutls_global_deinit();
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ typedef virNetTLSSession *virNetTLSSessionPtr;
|
||||
|
||||
|
||||
void virNetTLSInit(void);
|
||||
void virNetTLSDeinit(void);
|
||||
|
||||
virNetTLSContextPtr virNetTLSContextNewServerPath(const char *pkipath,
|
||||
bool tryUserPkiPath,
|
||||
|
Loading…
x
Reference in New Issue
Block a user