Commit 8049a1d7 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Use utils.ReadFile to read SSL certificate

Reviewed-by: iustinp
parent 4c7c81d7
......@@ -294,11 +294,7 @@ def SetupNodeDaemon(node, ssh_key_check):
gntpass = utils.GetNodeDaemonPassword()
if not re.match('^[a-zA-Z0-9.]{1,64}$', gntpass):
raise errors.OpExecError("ganeti password corruption detected")
f = open(constants.SSL_CERT_FILE)
gntpem =
gntpem = utils.ReadFile(constants.SSL_CERT_FILE)
# in the base64 pem encoding, neither '!' nor '.' are valid chars,
# so we use this to detect an invalid certificate; as long as the
# cert doesn't contain this, the here-document will be correctly
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