Commit 7766de33 authored by Agata Murawska's avatar Agata Murawska
Browse files

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: default avatarAgata Murawska <agatamurawska@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 579f4ee5
......@@ -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"
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment