From 7766de33df1d88304407814b6c029bc220d9dfdc Mon Sep 17 00:00:00 2001 From: Agata Murawska <agatamurawska@google.com> Date: Thu, 20 Sep 2012 16:15:17 +0200 Subject: [PATCH] Add nodedCertFile to Path This patch adds missing Path entry and uses it in Rpc. It was not in place before due to different build settings - i.e. if curl was disabled, there were no problems. Signed-off-by: Agata Murawska <agatamurawska@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- htools/Ganeti/Path.hs | 5 +++++ htools/Ganeti/Rpc.hs | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htools/Ganeti/Path.hs b/htools/Ganeti/Path.hs index 5f439dd36..ee102d50a 100644 --- a/htools/Ganeti/Path.hs +++ b/htools/Ganeti/Path.hs @@ -31,6 +31,7 @@ module Ganeti.Path , runDir , confdHmacKey , clusterConfFile + , nodedCertFile ) where import qualified Ganeti.Constants as C @@ -68,3 +69,7 @@ confdHmacKey = dataDir </> "hmac.key" -- | Path to cluster configuration file clusterConfFile :: FilePath clusterConfFile = dataDir </> "config.data" + +-- | Path +nodedCertFile :: FilePath +nodedCertFile = dataDir </> "server.pem" diff --git a/htools/Ganeti/Rpc.hs b/htools/Ganeti/Rpc.hs index 77a0686da..f78dceb92 100644 --- a/htools/Ganeti/Rpc.hs +++ b/htools/Ganeti/Rpc.hs @@ -60,6 +60,7 @@ import Text.JSON (makeObj) #ifndef NO_CURL import Network.Curl +import qualified Ganeti.Path as P #endif import qualified Ganeti.Constants as C @@ -72,13 +73,13 @@ import Ganeti.JSON -- | The curl options used for RPC. curlOpts :: [CurlOption] curlOpts = [ CurlFollowLocation False - , CurlCAInfo C.nodedCertFile + , CurlCAInfo P.nodedCertFile , CurlSSLVerifyHost 0 , CurlSSLVerifyPeer True , CurlSSLCertType "PEM" - , CurlSSLCert C.nodedCertFile + , CurlSSLCert P.nodedCertFile , CurlSSLKeyType "PEM" - , CurlSSLKey C.nodedCertFile + , CurlSSLKey P.nodedCertFile , CurlConnectTimeout (fromIntegral C.rpcConnectTimeout) ] #endif -- GitLab