Noded uses the constant "bootstrap" when starting
without client certificates. This patch moves the
constant to Constants.hs.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
"""
# some parameters are unused, but this is the API
# pylint: disable=W0613
- _BOOTSTRAP = "bootstrap"
sstore = ssconf.SimpleStore()
try:
candidate_certs = sstore.GetMasterCandidatesCertMap()
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
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