diff --git a/htools/Ganeti/Path.hs b/htools/Ganeti/Path.hs index 5f439dd365a6815cd8e04c61d824a89a4bee5c18..ee102d50aef5231219dfc44308a286399454d800 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 77a0686dad0f72aff45fe3083d03fc158a7508d1..f78dceb9279159a4d54947fe208f8edd4bad19ce 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