Noded uses the constant "bootstrap" when starting without client certificates. This patch moves the constant to Constants.hs.
Signed-off-by: Helga Velroyen <[email protected]> --- lib/server/noded.py | 3 +-- src/Ganeti/Constants.hs | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/server/noded.py b/lib/server/noded.py index fa1e10f..a7fdf49 100644 --- a/lib/server/noded.py +++ b/lib/server/noded.py @@ -1266,7 +1266,6 @@ def SSLVerifyPeer(conn, cert, errnum, errdepth, ok): """ # some parameters are unused, but this is the API # pylint: disable=W0613 - _BOOTSTRAP = "bootstrap" sstore = ssconf.SimpleStore() try: candidate_certs = sstore.GetMasterCandidatesCertMap() @@ -1276,7 +1275,7 @@ def SSLVerifyPeer(conn, cert, errnum, errdepth, ok): candidate_certs = None if not candidate_certs: candidate_certs = { - _BOOTSTRAP: utils.GetCertificateDigest( + constants.CRYPTO_BOOTSTRAP: utils.GetCertificateDigest( cert_filename=pathutils.NODED_CERT_FILE)} return cert.digest("sha1") in candidate_certs.values() # pylint: enable=W0613 diff --git a/src/Ganeti/Constants.hs b/src/Ganeti/Constants.hs index 77b0949..7b66c84 100644 --- a/src/Ganeti/Constants.hs +++ b/src/Ganeti/Constants.hs @@ -4389,6 +4389,11 @@ cryptoActionGet = "get" cryptoActions :: FrozenSet String cryptoActions = ConstantUtils.mkSet [cryptoActionGet] +-- Key word for master candidate cert list for bootstrapping. + +cryptoBootstrap :: String +cryptoBootstrap = "bootstrap" + -- * Options for CryptoActions -- Filename of the certificate -- 2.4.3.573.g4eafbef
