1
0
Fork 0
mirror of https://github.com/ThomasGsp/HyperProxmox.git synced 2025-03-09 15:40:18 +00:00

fix key load and hassh

This commit is contained in:
Tlams 2018-02-19 18:09:51 +00:00
parent 25a7ae6699
commit 07a1ef3190

View file

@ -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()