From 07a1ef3190d4d65a54e8540b867a74001ccc97cb Mon Sep 17 00:00:00 2001 From: Tlams Date: Mon, 19 Feb 2018 18:09:51 +0000 Subject: [PATCH] fix key load and hassh --- code/scripts/main/startup.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code/scripts/main/startup.py b/code/scripts/main/startup.py index b31af4e..351fdf3 100644 --- a/code/scripts/main/startup.py +++ b/code/scripts/main/startup.py @@ -41,7 +41,8 @@ if __name__ == "__main__": "\n - Public Key: {1}" .format(localconf['system']['key_pvt'], localconf['system']['key_pvt'])) print("Passphrase HASH: {0}".format(passhash)) - print("You must save your passphrase hash in a security place !") + print("You MUST save your passphrase hash in a security place !") + key_pvt = CritConf.read_private_key(localconf['system']['key_pvt'], passhash) else: print(gen['Error']) exit(1) @@ -56,7 +57,7 @@ if __name__ == "__main__": """ Step two""" if 'passhash' not in vars(): - passhash = encodepassphrase(getpass.getpass("This system need a passphrase to start:")) + passhash = getpass.getpass("This system need a passphrase to start:") key_pvt = CritConf.read_private_key(localconf['system']['key_pvt'], passhash) if key_pvt['result'] != "OK": print("{0}: {1}" @@ -68,9 +69,7 @@ if __name__ == "__main__": # URL MAPPING urls = \ ( - # FRESH DATA - # MAPPING INSTANCES '/api/v1/instance', 'Instance', '/api/v1/instance/new', 'Instance', @@ -147,5 +146,4 @@ if __name__ == "__main__": """ Init API thread """ api_th = ThreadAPI(1, "ThreadAPI", urls, core, generalconf) - api_th.start() - + api_th.start() \ No newline at end of file