Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ module Ganeti.Path ...@@ -31,6 +31,7 @@ module Ganeti.Path
, runDir , runDir
, confdHmacKey , confdHmacKey
, clusterConfFile , clusterConfFile
, nodedCertFile
) where ) where
import qualified Ganeti.Constants as C import qualified Ganeti.Constants as C
...@@ -68,3 +69,7 @@ confdHmacKey = dataDir </> "hmac.key" ...@@ -68,3 +69,7 @@ confdHmacKey = dataDir </> "hmac.key"
-- | Path to cluster configuration file -- | Path to cluster configuration file
clusterConfFile :: FilePath clusterConfFile :: FilePath
clusterConfFile = dataDir </> "config.data" clusterConfFile = dataDir </> "config.data"
-- | Path
nodedCertFile :: FilePath
nodedCertFile = dataDir </> "server.pem"
...@@ -60,6 +60,7 @@ import Text.JSON (makeObj) ...@@ -60,6 +60,7 @@ import Text.JSON (makeObj)
#ifndef NO_CURL #ifndef NO_CURL
import Network.Curl import Network.Curl
import qualified Ganeti.Path as P
#endif #endif
import qualified Ganeti.Constants as C import qualified Ganeti.Constants as C
...@@ -72,13 +73,13 @@ import Ganeti.JSON ...@@ -72,13 +73,13 @@ import Ganeti.JSON
-- | The curl options used for RPC. -- | The curl options used for RPC.
curlOpts :: [CurlOption] curlOpts :: [CurlOption]
curlOpts = [ CurlFollowLocation False curlOpts = [ CurlFollowLocation False
, CurlCAInfo C.nodedCertFile , CurlCAInfo P.nodedCertFile
, CurlSSLVerifyHost 0 , CurlSSLVerifyHost 0
, CurlSSLVerifyPeer True , CurlSSLVerifyPeer True
, CurlSSLCertType "PEM" , CurlSSLCertType "PEM"
, CurlSSLCert C.nodedCertFile , CurlSSLCert P.nodedCertFile
, CurlSSLKeyType "PEM" , CurlSSLKeyType "PEM"
, CurlSSLKey C.nodedCertFile , CurlSSLKey P.nodedCertFile
, CurlConnectTimeout (fromIntegral C.rpcConnectTimeout) , CurlConnectTimeout (fromIntegral C.rpcConnectTimeout)
] ]
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment