diff --git a/libs/keys.py b/libs/keys.py index 4e99bac..4128514 100755 --- a/libs/keys.py +++ b/libs/keys.py @@ -17,7 +17,7 @@ publicRSAKey = None publicRSAPEM = None # INFO Common entry point to authentication -def ensure(): +def ensure(savekeys=True): if( os.path.exists("private.key") ): @@ -25,9 +25,9 @@ def ensure(): load() else: print("[ED25519] Creating ed25519 private key...") - create() + create(savekeys) -def create(): +def create(savekeys=True): global privateKey global privateBytes # ED25519 Creation @@ -45,7 +45,8 @@ def create(): # RSA Creation derive() # Writing file - save() + if savekeys: + save() def load(filepath="./"): global privateBytes diff --git a/term.py b/term.py index 8943738..8d3cbe9 100755 --- a/term.py +++ b/term.py @@ -59,7 +59,6 @@ def main(): print("[MAIN CYCLE] Starting watchdog...") was_connected = False cooldownHeader = False - loading.start("[ eMesh Main Cycle is Running ") while not ((os.getenv("FORCE_QUIT") == "True") or forceQuit): # This is just a way to check if we need to notify the gui are_connected = emesh.connected @@ -104,7 +103,6 @@ def main(): # print("[MAIN CYCLE] Sleeping complete. Proceeding to the next cycle...") print("[MAIN CYCLE] Exiting main cycle...") print("[SYSTEM] Exiting...") - loading.stop() print("[SYSTEM] Ready to start.")