Revision 29a30533 htools/Ganeti/Rpc.hs

b/htools/Ganeti/Rpc.hs
92 92
-- | The curl options used for RPC.
93 93
curlOpts :: [CurlOption]
94 94
curlOpts = [ CurlFollowLocation False
95
           , CurlCAInfo P.nodedCertFile
96 95
           , CurlSSLVerifyHost 0
97 96
           , CurlSSLVerifyPeer True
98 97
           , CurlSSLCertType "PEM"
99
           , CurlSSLCert P.nodedCertFile
100 98
           , CurlSSLKeyType "PEM"
101
           , CurlSSLKey P.nodedCertFile
102 99
           , CurlConnectTimeout (fromIntegral C.rpcConnectTimeout)
103 100
           ]
104 101
#endif
......
171 168
executeHttpRequest _ _ = return $ Left CurlDisabledError
172 169
#else
173 170
executeHttpRequest node (Right request) = do
171
  cert_file <- P.nodedCertFile
174 172
  let reqOpts = [ CurlTimeout (fromIntegral $ requestTimeout request)
175 173
                , CurlPostFields [requestPostData request]
174
                , CurlSSLCert cert_file
175
                , CurlSSLKey cert_file
176
                , CurlCAInfo cert_file
176 177
                ]
177 178
      url = requestUrl request
178 179
  -- FIXME: This is very similar to getUrl in Htools/Rapi.hs

Also available in: Unified diff