dont create old userid
This commit is contained in:
parent
2c9109a7a5
commit
f1ba3fbd34
3 changed files with 15 additions and 15 deletions
|
|
@ -58,15 +58,13 @@ if os.path.exists(key_path):
|
|||
with open(key_path, 'rb') as fd:
|
||||
sk = ed25519.SigningKey(fd.read())
|
||||
vk = sk.get_verifying_key()
|
||||
OLD_USER_ID = vk.to_ascii(encoding='base64').decode()
|
||||
else:
|
||||
sk, vk = ed25519.create_keypair()
|
||||
with open(key_path, 'wb') as fd:
|
||||
os.chmod(key_path, 0o600)
|
||||
fd.write(sk.to_bytes())
|
||||
os.chmod(key_path, 0o400)
|
||||
sk = None
|
||||
vk = None
|
||||
OLD_USER_ID = None
|
||||
|
||||
USER_ID = get_user_id(ssl_key_path, ssl_cert_path)
|
||||
OLD_USER_ID = vk.to_ascii(encoding='base64').decode()
|
||||
|
||||
OML_UPDATE_KEY='K55EZpPYbP3X+3mA66cztlw1sSaUMqGwfTDKQyP2qOU'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue