]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Rename HAVE_GNUTLS to WITH_GNUTLS
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 8 Jan 2013 21:02:05 +0000 (21:02 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 14 Jan 2013 13:26:47 +0000 (13:26 +0000)
20 files changed:
configure.ac
daemon/libvirtd.c
daemon/remote.c
src/Makefile.am
src/libvirt.c
src/locking/lock_daemon.c
src/lxc/lxc_controller.c
src/qemu/qemu_migration.c
src/remote/remote_driver.c
src/rpc/virnetclient.c
src/rpc/virnetclient.h
src/rpc/virnetserver.c
src/rpc/virnetserver.h
src/rpc/virnetserverclient.c
src/rpc/virnetserverclient.h
src/rpc/virnetserverservice.c
src/rpc/virnetserverservice.h
src/rpc/virnetsocket.c
src/rpc/virnetsocket.h
tests/Makefile.am

index 6b18ef0131f02fff3949327c263c7fd373099888..cd008995de77f75f952b42036271a1b24e0bbf94 100644 (file)
@@ -1086,10 +1086,10 @@ if test "x$with_gnutls" != "xno"; then
 fi
 
 if test "x$with_gnutls" = "xyes" ; then
-  AC_DEFINE_UNQUOTED([HAVE_GNUTLS], 1,
+  AC_DEFINE_UNQUOTED([WITH_GNUTLS], 1,
       [whether GNUTLS is available for encryption])
 fi
-AM_CONDITIONAL([HAVE_GNUTLS], [test "x$with_gnutls" = "xyes"])
+AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_gnutls" = "xyes"])
 AC_SUBST([GNUTLS_CFLAGS])
 AC_SUBST([GNUTLS_LIBS])
 
index 7a51387fe80ac01365ab3a514bc149681d4574e1..9cdf4d9d644ccc3157c1cf2214fb528c093c77f2 100644 (file)
@@ -449,7 +449,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
     virNetServerServicePtr svc = NULL;
     virNetServerServicePtr svcRO = NULL;
     virNetServerServicePtr svcTCP = NULL;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetServerServicePtr svcTLS = NULL;
 #endif
     gid_t unix_sock_gid = 0;
@@ -476,7 +476,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
                                            unix_sock_rw_mask,
                                            unix_sock_gid,
                                            config->auth_unix_rw,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                            NULL,
 #endif
                                            false,
@@ -488,7 +488,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
                                                  unix_sock_ro_mask,
                                                  unix_sock_gid,
                                                  config->auth_unix_ro,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                  NULL,
 #endif
                                                  true,
@@ -513,7 +513,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
             if (!(svcTCP = virNetServerServiceNewTCP(config->listen_addr,
                                                      config->tcp_port,
                                                      config->auth_tcp,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                      NULL,
 #endif
                                                      false,
@@ -525,7 +525,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
                 goto error;
         }
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
         if (config->listen_tls) {
             virNetTLSContextPtr ctxt = NULL;
 
@@ -581,7 +581,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
 #if WITH_SASL
     if (config->auth_unix_rw == REMOTE_AUTH_SASL ||
         config->auth_unix_ro == REMOTE_AUTH_SASL ||
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
         config->auth_tls == REMOTE_AUTH_SASL ||
 # endif
         config->auth_tcp == REMOTE_AUTH_SASL) {
@@ -595,7 +595,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
     return 0;
 
 error:
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(svcTLS);
 #endif
     virObjectUnref(svcTCP);
index 1a0af7e3085a2c82bcded8e2306078277bc307c2..7b1f8ebe62bcbd1a674fdf9f5fbb47b7a1083173 100644 (file)
@@ -2464,7 +2464,7 @@ remoteDispatchAuthSaslInit(virNetServerPtr server ATTRIBUTE_UNUSED,
     if (!sasl)
         goto authfail;
 
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
     /* Inform SASL that we've got an external SSF layer from TLS */
     if (virNetServerClientHasTLSSession(client)) {
         int ssf;
index 8d6e53ba580cbcc6f9f4ba1de7138a2f2dd7bc19..ede67e91c9d0e267d57f002d517a5db4b7ed4078 100644 (file)
@@ -1779,7 +1779,7 @@ else
 EXTRA_DIST += \
        rpc/virnetsshsession.h rpc/virnetsshsession.c
 endif
-if HAVE_GNUTLS
+if WITH_GNUTLS
 libvirt_net_rpc_la_SOURCES += \
        rpc/virnettlscontext.h rpc/virnettlscontext.c
 else
index a783fa6df8c5cd261212625d30364d44fef09212..1490738defe1691bdfbff862e2f884c6e1d359bd 100644 (file)
@@ -55,7 +55,7 @@
 #include "configmake.h"
 #include "intprops.h"
 #include "virconf.h"
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 # include "rpc/virnettlscontext.h"
 #endif
 #include "vircommand.h"
@@ -271,7 +271,7 @@ winsock_init(void)
 #endif
 
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 static int virTLSMutexInit(void **priv)
 {
     virMutexPtr lock = NULL;
@@ -408,14 +408,14 @@ virGlobalInit(void)
         virErrorInitialize() < 0)
         goto error;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     gcry_control(GCRYCTL_SET_THREAD_CBS, &virTLSThreadImpl);
     gcry_check_version(NULL);
 #endif
 
     virLogSetFromEnv();
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     virNetTLSInit();
 #endif
 
index ba42c00ff66b4b69f64fe3c2b15e0a0ea0ba9da2..f0eba48425ebbbf219d37f3fa6811176792bc95e 100644 (file)
@@ -655,7 +655,7 @@ virLockDaemonSetupNetworkingSystemD(virNetServerPtr srv)
     /* Systemd passes FDs, starting immediately after stderr,
      * so the first FD we'll get is '3'. */
     if (!(svc = virNetServerServiceNewFD(3, 0,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                          NULL,
 #endif
                                          false, 1)))
@@ -677,7 +677,7 @@ virLockDaemonSetupNetworkingNative(virNetServerPtr srv, const char *sock_path)
     VIR_DEBUG("Setting up networking natively");
 
     if (!(svc = virNetServerServiceNewUNIX(sock_path, 0700, 0, 0,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                            NULL,
 #endif
                                            false, 1)))
index 76b2986fdf1e4d5ca3606bf973b7caea2574c573..2673f72c5e0d7eb0d3ed9fa79064ee07fb1c7aa6 100644 (file)
@@ -631,7 +631,7 @@ static int virLXCControllerSetupServer(virLXCControllerPtr ctrl)
                                            0700,
                                            0,
                                            0,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                            NULL,
 #endif
                                            false,
index e235677f96c9e426428723aaa3a23b936201dcd0..f17c7ffef1ec0b0cef1dd935e63b639deddf1151 100644 (file)
@@ -23,7 +23,7 @@
 #include <config.h>
 
 #include <sys/time.h>
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 # include <gnutls/gnutls.h>
 # include <gnutls/x509.h>
 #endif
@@ -198,7 +198,7 @@ static void qemuMigrationCookieFree(qemuMigrationCookiePtr mig)
 }
 
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 static char *
 qemuDomainExtractTLSSubject(const char *certdir)
 {
@@ -276,7 +276,7 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
         if (!listenAddr)
             listenAddr = driver->vncListen;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
         if (driver->vncTLS &&
             !(mig->tlsSubject = qemuDomainExtractTLSSubject(driver->vncTLSx509certdir)))
             goto error;
@@ -291,7 +291,7 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
         if (!listenAddr)
             listenAddr = driver->spiceListen;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
         if (driver->spiceTLS &&
             !(mig->tlsSubject = qemuDomainExtractTLSSubject(driver->spiceTLSx509certdir)))
             goto error;
@@ -304,7 +304,7 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
 
 no_memory:
     virReportOOMError();
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 error:
 #endif
     qemuMigrationCookieGraphicsFree(mig);
index 862e4742de1713ee10bf32fb4a1a7fff8639a96e..dcb06c97263bc131cbddf052f9575d9a73e14f60 100644 (file)
@@ -80,7 +80,7 @@ struct private_data {
 
     int counter; /* Serial number for RPC */
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     virNetTLSContextPtr tls;
 #endif
 
@@ -598,7 +598,7 @@ doRemoteOpen(virConnectPtr conn,
     /* Connect to the remote service. */
     switch (transport) {
     case trans_tls:
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
         priv->tls = virNetTLSContextNewClientPath(pkipath,
                                                   geteuid() != 0 ? true : false,
                                                   sanity, verify);
@@ -618,7 +618,7 @@ doRemoteOpen(virConnectPtr conn,
         if (!priv->client)
             goto failed;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
         if (priv->tls) {
             VIR_DEBUG("Starting TLS session");
             if (virNetClientSetTLSSession(priv->client, priv->tls) < 0)
@@ -1012,7 +1012,7 @@ doRemoteClose(virConnectPtr conn, struct private_data *priv)
              (xdrproc_t) xdr_void, (char *) NULL) == -1)
         ret = -1;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     virObjectUnref(priv->tls);
     priv->tls = NULL;
 #endif
@@ -3893,7 +3893,7 @@ remoteAuthSASL(virConnectPtr conn, struct private_data *priv,
                                             saslcb)))
         goto cleanup;
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
     /* Initialize some connection props we care about */
     if (priv->tls) {
         if ((ssf = virNetClientGetTLSKeySize(priv->client)) < 0)
index 10ed4f00a1acb2345fb75894b8c7bd4bd2455124..69c44781672b4f6284414e1781897742b556f30b 100644 (file)
@@ -70,7 +70,7 @@ struct _virNetClient {
     virNetSocketPtr sock;
     bool asyncIO;
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetTLSSessionPtr tls;
 #endif
     char *hostname;
@@ -629,7 +629,7 @@ void virNetClientDispose(void *obj)
     if (client->sock)
         virNetSocketRemoveIOCallback(client->sock);
     virObjectUnref(client->sock);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(client->tls);
 #endif
 #if WITH_SASL
@@ -667,7 +667,7 @@ virNetClientCloseLocked(virNetClientPtr client)
 
     virObjectUnref(client->sock);
     client->sock = NULL;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(client->tls);
     client->tls = NULL;
 #endif
@@ -751,7 +751,7 @@ void virNetClientSetSASLSession(virNetClientPtr client,
 #endif
 
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 int virNetClientSetTLSSession(virNetClientPtr client,
                               virNetTLSContextPtr tls)
 {
@@ -860,7 +860,7 @@ bool virNetClientIsEncrypted(virNetClientPtr client)
 {
     bool ret = false;
     virNetClientLock(client);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (client->tls)
         ret = true;
 #endif
@@ -966,7 +966,7 @@ const char *virNetClientRemoteAddrString(virNetClientPtr client)
     return virNetSocketRemoteAddrString(client->sock);
 }
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 int virNetClientGetTLSKeySize(virNetClientPtr client)
 {
     int ret = 0;
index 7e35b9c0c90f3a90fce364f29cca48cd0c82110f..99ea263044f0493d198178dced80bd88d955e826 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __VIR_NET_CLIENT_H__
 # define __VIR_NET_CLIENT_H__
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 #  include "virnettlscontext.h"
 # endif
 # include "virnetmessage.h"
@@ -109,7 +109,7 @@ void virNetClientSetSASLSession(virNetClientPtr client,
                                 virNetSASLSessionPtr sasl);
 # endif
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 int virNetClientSetTLSSession(virNetClientPtr client,
                               virNetTLSContextPtr tls);
 # endif
@@ -120,7 +120,7 @@ bool virNetClientIsOpen(virNetClientPtr client);
 const char *virNetClientLocalAddrString(virNetClientPtr client);
 const char *virNetClientRemoteAddrString(virNetClientPtr client);
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 int virNetClientGetTLSKeySize(virNetClientPtr client);
 # endif
 
index b9df71b93f947199e5262d6a9e7c52ccba67f10d..a937eda720695f849c91fb1db4ba2dfd9ea2e2dd 100644 (file)
@@ -98,7 +98,7 @@ struct _virNetServer {
 
     unsigned int quit :1;
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     virNetTLSContextPtr tls;
 #endif
 
@@ -311,7 +311,7 @@ static int virNetServerDispatchNewClient(virNetServerServicePtr svc,
                                          virNetServerServiceGetAuth(svc),
                                          virNetServerServiceIsReadonly(svc),
                                          virNetServerServiceGetMaxRequests(svc),
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                          virNetServerServiceGetTLSContext(svc),
 #endif
                                          srv->clientPrivNew,
@@ -1038,7 +1038,7 @@ no_memory:
     return -1;
 }
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 int virNetServerSetTLSContext(virNetServerPtr srv,
                               virNetTLSContextPtr tls)
 {
index d906dd173c6ce79a57eb8657f1361e7d8199aa6b..1a85c024bbb27d2db50d883277d46dafe44af5cd 100644 (file)
@@ -26,7 +26,7 @@
 
 # include <signal.h>
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 #  include "virnettlscontext.h"
 # endif
 # include "virnetserverprogram.h"
@@ -81,7 +81,7 @@ int virNetServerAddService(virNetServerPtr srv,
 int virNetServerAddProgram(virNetServerPtr srv,
                            virNetServerProgramPtr prog);
 
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
 int virNetServerSetTLSContext(virNetServerPtr srv,
                               virNetTLSContextPtr tls);
 # endif
index 05e0e06ced4bac84cec44cd70d907710b4ee1b7c..bd4e66fd7db958af29c8a3dc23ac46c414e41857 100644 (file)
@@ -66,7 +66,7 @@ struct _virNetServerClient
     int auth;
     bool readonly;
     char *identity;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetTLSContextPtr tlsCtxt;
     virNetTLSSessionPtr tls;
 #endif
@@ -149,7 +149,7 @@ virNetServerClientCalculateHandleMode(virNetServerClientPtr client) {
 
 
     VIR_DEBUG("tls=%p hs=%d, rx=%p tx=%p",
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
               client->tls,
               client->tls ? virNetTLSSessionGetHandshakeStatus(client->tls) : -1,
 #else
@@ -160,7 +160,7 @@ virNetServerClientCalculateHandleMode(virNetServerClientPtr client) {
     if (!client->sock || client->wantClose)
         return 0;
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (client->tls) {
         switch (virNetTLSSessionGetHandshakeStatus(client->tls)) {
         case VIR_NET_TLS_HANDSHAKE_RECVING:
@@ -188,7 +188,7 @@ virNetServerClientCalculateHandleMode(virNetServerClientPtr client) {
            then monitor for writability on socket */
         if (client->tx)
             mode |= VIR_EVENT_HANDLE_WRITABLE;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     }
 #endif
     VIR_DEBUG("mode=%o", mode);
@@ -297,7 +297,7 @@ void virNetServerClientRemoveFilter(virNetServerClientPtr client,
 }
 
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 /* Check the client's access. */
 static int
 virNetServerClientCheckAccess(virNetServerClientPtr client)
@@ -353,7 +353,7 @@ static void virNetServerClientSockTimerFunc(int timer,
 static virNetServerClientPtr
 virNetServerClientNewInternal(virNetSocketPtr sock,
                               int auth,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
                               virNetTLSContextPtr tls,
 #endif
                               bool readonly,
@@ -375,7 +375,7 @@ virNetServerClientNewInternal(virNetSocketPtr sock,
     client->sock = virObjectRef(sock);
     client->auth = auth;
     client->readonly = readonly;
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
     client->tlsCtxt = virObjectRef(tls);
 #endif
     client->nrequests_max = nrequests_max;
@@ -411,7 +411,7 @@ virNetServerClientPtr virNetServerClientNew(virNetSocketPtr sock,
                                             int auth,
                                             bool readonly,
                                             size_t nrequests_max,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
                                             virNetTLSContextPtr tls,
 #endif
                                             virNetServerClientPrivNew privNew,
@@ -422,7 +422,7 @@ virNetServerClientPtr virNetServerClientNew(virNetSocketPtr sock,
     virNetServerClientPtr client;
 
     VIR_DEBUG("sock=%p auth=%d tls=%p", sock, auth,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
               tls
 #else
               NULL
@@ -430,7 +430,7 @@ virNetServerClientPtr virNetServerClientNew(virNetSocketPtr sock,
         );
 
     if (!(client = virNetServerClientNewInternal(sock, auth,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
                                                  tls,
 #endif
                                                  readonly, nrequests_max)))
@@ -499,7 +499,7 @@ virNetServerClientPtr virNetServerClientNewPostExecRestart(virJSONValuePtr objec
 
     if (!(client = virNetServerClientNewInternal(sock,
                                                  auth,
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
                                                  NULL,
 #endif
                                                  readonly,
@@ -602,7 +602,7 @@ bool virNetServerClientGetReadonly(virNetServerClientPtr client)
 }
 
 
-#ifdef HAVE_GNUTLS
+#ifdef WITH_GNUTLS
 bool virNetServerClientHasTLSSession(virNetServerClientPtr client)
 {
     bool has;
@@ -648,7 +648,7 @@ bool virNetServerClientIsSecure(virNetServerClientPtr client)
 {
     bool secure = false;
     virNetServerClientLock(client);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (client->tls)
         secure = true;
 #endif
@@ -765,7 +765,7 @@ void virNetServerClientDispose(void *obj)
 #endif
     if (client->sockTimer > 0)
         virEventRemoveTimeout(client->sockTimer);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(client->tls);
     virObjectUnref(client->tlsCtxt);
 #endif
@@ -821,7 +821,7 @@ void virNetServerClientClose(virNetServerClientPtr client)
     if (client->sock)
         virNetSocketRemoveIOCallback(client->sock);
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (client->tls) {
         virObjectUnref(client->tls);
         client->tls = NULL;
@@ -886,13 +886,13 @@ int virNetServerClientInit(virNetServerClientPtr client)
 {
     virNetServerClientLock(client);
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (!client->tlsCtxt) {
 #endif
         /* Plain socket, so prepare to read first message */
         if (virNetServerClientRegisterEvent(client) < 0)
             goto error;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     } else {
         int ret;
 
@@ -1224,7 +1224,7 @@ virNetServerClientDispatchWrite(virNetServerClientPtr client)
 }
 
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 static void
 virNetServerClientDispatchHandshake(virNetServerClientPtr client)
 {
@@ -1264,7 +1264,7 @@ virNetServerClientDispatchEvent(virNetSocketPtr sock, int events, void *opaque)
 
     if (events & (VIR_EVENT_HANDLE_WRITABLE |
                   VIR_EVENT_HANDLE_READABLE)) {
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
         if (client->tls &&
             virNetTLSSessionGetHandshakeStatus(client->tls) !=
             VIR_NET_TLS_HANDSHAKE_COMPLETE) {
@@ -1276,7 +1276,7 @@ virNetServerClientDispatchEvent(virNetSocketPtr sock, int events, void *opaque)
             if (events & VIR_EVENT_HANDLE_READABLE &&
                 client->rx)
                 virNetServerClientDispatchRead(client);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
         }
 #endif
     }
index 40010c8a1d1169c6e40ee97d3d77bb434a1102cf..325f5d9c4e8bf1d7446695f19408e81e3e925044 100644 (file)
@@ -52,7 +52,7 @@ virNetServerClientPtr virNetServerClientNew(virNetSocketPtr sock,
                                             int auth,
                                             bool readonly,
                                             size_t nrequests_max,
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
                                             virNetTLSContextPtr tls,
 # endif
                                             virNetServerClientPrivNew privNew,
@@ -78,7 +78,7 @@ void virNetServerClientRemoveFilter(virNetServerClientPtr client,
 int virNetServerClientGetAuth(virNetServerClientPtr client);
 bool virNetServerClientGetReadonly(virNetServerClientPtr client);
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 bool virNetServerClientHasTLSSession(virNetServerClientPtr client);
 int virNetServerClientGetTLSKeySize(virNetServerClientPtr client);
 # endif
index 61dd682aaeabd8a4771608a92a242a3ad792fa3c..b39f0ef2753217f79ed733aa40655abb2b7d5f65 100644 (file)
@@ -41,7 +41,7 @@ struct _virNetServerService {
     bool readonly;
     size_t nrequests_client_max;
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetTLSContextPtr tls;
 #endif
 
@@ -92,7 +92,7 @@ cleanup:
 virNetServerServicePtr virNetServerServiceNewTCP(const char *nodename,
                                                  const char *service,
                                                  int auth,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                  virNetTLSContextPtr tls,
 #endif
                                                  bool readonly,
@@ -110,7 +110,7 @@ virNetServerServicePtr virNetServerServiceNewTCP(const char *nodename,
     svc->auth = auth;
     svc->readonly = readonly;
     svc->nrequests_client_max = nrequests_client_max;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     svc->tls = virObjectRef(tls);
 #endif
 
@@ -150,7 +150,7 @@ virNetServerServicePtr virNetServerServiceNewUNIX(const char *path,
                                                   mode_t mask,
                                                   gid_t grp,
                                                   int auth,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                   virNetTLSContextPtr tls,
 #endif
                                                   bool readonly,
@@ -168,7 +168,7 @@ virNetServerServicePtr virNetServerServiceNewUNIX(const char *path,
     svc->auth = auth;
     svc->readonly = readonly;
     svc->nrequests_client_max = nrequests_client_max;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     svc->tls = virObjectRef(tls);
 #endif
 
@@ -212,7 +212,7 @@ error:
 
 virNetServerServicePtr virNetServerServiceNewFD(int fd,
                                                 int auth,
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
                                                 virNetTLSContextPtr tls,
 #endif
                                                 bool readonly,
@@ -230,7 +230,7 @@ virNetServerServicePtr virNetServerServiceNewFD(int fd,
     svc->auth = auth;
     svc->readonly = readonly;
     svc->nrequests_client_max = nrequests_client_max;
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     svc->tls = virObjectRef(tls);
 #endif
 
@@ -415,7 +415,7 @@ size_t virNetServerServiceGetMaxRequests(virNetServerServicePtr svc)
     return svc->nrequests_client_max;
 }
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 virNetTLSContextPtr virNetServerServiceGetTLSContext(virNetServerServicePtr svc)
 {
     return svc->tls;
@@ -440,7 +440,7 @@ void virNetServerServiceDispose(void *obj)
         virObjectUnref(svc->socks[i]);
     VIR_FREE(svc->socks);
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virObjectUnref(svc->tls);
 #endif
 }
index 934b8d3965af40bc688843fa196edc87efda7dcf..1ece50350b2c12c3273052438fdbeccfe704cac8 100644 (file)
@@ -40,7 +40,7 @@ typedef int (*virNetServerServiceDispatchFunc)(virNetServerServicePtr svc,
 virNetServerServicePtr virNetServerServiceNewTCP(const char *nodename,
                                                  const char *service,
                                                  int auth,
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
                                                  virNetTLSContextPtr tls,
 # endif
                                                  bool readonly,
@@ -49,14 +49,14 @@ virNetServerServicePtr virNetServerServiceNewUNIX(const char *path,
                                                   mode_t mask,
                                                   gid_t grp,
                                                   int auth,
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
                                                   virNetTLSContextPtr tls,
 # endif
                                                   bool readonly,
                                                   size_t nrequests_client_max);
 virNetServerServicePtr virNetServerServiceNewFD(int fd,
                                                 int auth,
-# if HAVE_GNUTLS
+# if WITH_GNUTLS
                                                 virNetTLSContextPtr tls,
 # endif
                                                 bool readonly,
@@ -71,7 +71,7 @@ int virNetServerServiceGetPort(virNetServerServicePtr svc);
 int virNetServerServiceGetAuth(virNetServerServicePtr svc);
 bool virNetServerServiceIsReadonly(virNetServerServicePtr svc);
 size_t virNetServerServiceGetMaxRequests(virNetServerServicePtr svc);
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 virNetTLSContextPtr virNetServerServiceGetTLSContext(virNetServerServicePtr svc);
 # endif
 
index 00c61219f37635002a68cfb706eb79a47901ed65..0de999e81454768f8b19ad50f62b6e8da4d9f117 100644 (file)
@@ -79,7 +79,7 @@ struct _virNetSocket {
     char *localAddrStr;
     char *remoteAddrStr;
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     virNetTLSSessionPtr tlsSession;
 #endif
 #if WITH_SASL
@@ -950,7 +950,7 @@ virJSONValuePtr virNetSocketPreExecRestart(virNetSocketPtr sock)
         goto error;
     }
 #endif
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (sock->tlsSession) {
         virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                        _("Unable to save socket state when TLS session is active"));
@@ -1015,7 +1015,7 @@ void virNetSocketDispose(void *obj)
         unlink(sock->localAddr.data.un.sun_path);
 #endif
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     /* Make sure it can't send any more I/O during shutdown */
     if (sock->tlsSession)
         virNetTLSSessionSetIOCallbacks(sock->tlsSession, NULL, NULL, NULL);
@@ -1184,7 +1184,7 @@ const char *virNetSocketRemoteAddrString(virNetSocketPtr sock)
 }
 
 
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
 static ssize_t virNetSocketTLSSessionWrite(const char *buf,
                                            size_t len,
                                            void *opaque)
@@ -1287,7 +1287,7 @@ static ssize_t virNetSocketReadWire(virNetSocketPtr sock, char *buf, size_t len)
 #endif
 
 reread:
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (sock->tlsSession &&
         virNetTLSSessionGetHandshakeStatus(sock->tlsSession) ==
         VIR_NET_TLS_HANDSHAKE_COMPLETE) {
@@ -1295,7 +1295,7 @@ reread:
     } else {
 #endif
         ret = read(sock->fd, buf, len);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     }
 #endif
 
@@ -1346,7 +1346,7 @@ static ssize_t virNetSocketWriteWire(virNetSocketPtr sock, const char *buf, size
 #endif
 
 rewrite:
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     if (sock->tlsSession &&
         virNetTLSSessionGetHandshakeStatus(sock->tlsSession) ==
         VIR_NET_TLS_HANDSHAKE_COMPLETE) {
@@ -1354,7 +1354,7 @@ rewrite:
     } else {
 #endif
         ret = write(sock->fd, buf, len);
-#if HAVE_GNUTLS
+#if WITH_GNUTLS
     }
 #endif
 
index f1cb2ab949bfab29d6d257761efd617f9c54c214..13583f846cb19494b4ce61afe3f4d380d0f037ea 100644 (file)
@@ -26,7 +26,7 @@
 
 # include "virsocketaddr.h"
 # include "vircommand.h"
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 #  include "virnettlscontext.h"
 # endif
 # include "virobject.h"
@@ -124,7 +124,7 @@ ssize_t virNetSocketWrite(virNetSocketPtr sock, const char *buf, size_t len);
 int virNetSocketSendFD(virNetSocketPtr sock, int fd);
 int virNetSocketRecvFD(virNetSocketPtr sock, int *fd);
 
-# ifdef HAVE_GNUTLS
+# ifdef WITH_GNUTLS
 void virNetSocketSetTLSSession(virNetSocketPtr sock,
                                virNetTLSSessionPtr sess);
 # endif
index 0e5aec41beb68b38f826f4ba3706761a1a77e9f7..6f0dde52074d4d4f71ecaa3a0131cf46c6fb3bbb 100644 (file)
@@ -100,7 +100,7 @@ test_programs = virshtest sockettest \
        sysinfotest \
        $(NULL)
 
-if HAVE_GNUTLS
+if WITH_GNUTLS
 test_programs += virnettlscontexttest
 endif
 
@@ -530,7 +530,7 @@ virnetsockettest_SOURCES = \
 virnetsockettest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
 virnetsockettest_LDADD = $(LDADDS)
 
-if HAVE_GNUTLS
+if WITH_GNUTLS
 virnettlscontexttest_SOURCES = \
        virnettlscontexttest.c testutils.h testutils.c
 virnettlscontexttest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)