diff --git a/app.py b/app.py index ba75393..3108b9d 100644 --- a/app.py +++ b/app.py @@ -43,7 +43,7 @@ def verify_node(d): if "/" in node: raise ValueError("invalid node name %s", node) try: - log.info("gettingg client config from %s", "config/" + node) + log.info("getting client config from %s", "config/" + node) with open("config/" + node) as fh: node_conf = json.load(fh) except Exception as e: @@ -52,7 +52,7 @@ def verify_node(d): last = node_conf["last"] for key in node_conf["keys"]: msg = (node + " " + str(timestamp)).encode("UTF-8") - hmac2 = hmac.new(key.encode("UTF-8"), msg, "SHA-256") + hmac2 = hmac.new(key.encode("UTF-8"), msg, "SHA256") digest2 = hmac2.hexdigest() if hmac.compare_digest(digest1, digest2): if timestamp > node_conf["last"]: diff --git a/clients/report_loadavg b/clients/report_loadavg index c70c4d2..b5036c9 100755 --- a/clients/report_loadavg +++ b/clients/report_loadavg @@ -25,7 +25,7 @@ def report_loadavg(): node = hostname timestamp = time.time() msg = (node + " " + str(timestamp)).encode("UTF-8") - digest = hmac.new(client_config["key"].encode("UTF-8"), msg, "SHA-256").hexdigest() + digest = hmac.new(client_config["key"].encode("UTF-8"), msg, "SHA256").hexdigest() report.append( { "description": {