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:
parent
25a7ae6699
commit
07a1ef3190
1 changed files with 4 additions and 6 deletions
|
@ -41,7 +41,8 @@ if __name__ == "__main__":
|
||||||
"\n - Public Key: {1}"
|
"\n - Public Key: {1}"
|
||||||
.format(localconf['system']['key_pvt'], localconf['system']['key_pvt']))
|
.format(localconf['system']['key_pvt'], localconf['system']['key_pvt']))
|
||||||
print("Passphrase HASH: {0}".format(passhash))
|
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:
|
else:
|
||||||
print(gen['Error'])
|
print(gen['Error'])
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -56,7 +57,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
""" Step two"""
|
""" Step two"""
|
||||||
if 'passhash' not in vars():
|
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)
|
key_pvt = CritConf.read_private_key(localconf['system']['key_pvt'], passhash)
|
||||||
if key_pvt['result'] != "OK":
|
if key_pvt['result'] != "OK":
|
||||||
print("{0}: {1}"
|
print("{0}: {1}"
|
||||||
|
@ -68,9 +69,7 @@ if __name__ == "__main__":
|
||||||
# URL MAPPING
|
# URL MAPPING
|
||||||
urls = \
|
urls = \
|
||||||
(
|
(
|
||||||
|
|
||||||
# FRESH DATA
|
# FRESH DATA
|
||||||
|
|
||||||
# MAPPING INSTANCES
|
# MAPPING INSTANCES
|
||||||
'/api/v1/instance', 'Instance',
|
'/api/v1/instance', 'Instance',
|
||||||
'/api/v1/instance/new', 'Instance',
|
'/api/v1/instance/new', 'Instance',
|
||||||
|
@ -147,5 +146,4 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
""" Init API thread """
|
""" Init API thread """
|
||||||
api_th = ThreadAPI(1, "ThreadAPI", urls, core, generalconf)
|
api_th = ThreadAPI(1, "ThreadAPI", urls, core, generalconf)
|
||||||
api_th.start()
|
api_th.start()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue