From ee7e47eba0931126f9b5190dc5ed38ce77f3dce6 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Wed, 17 Apr 2019 23:33:15 +0200 Subject: [PATCH] Use latest little-boxes --- config.py | 2 +- utils/key.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.py b/config.py index 0e3e8fa..c0b7034 100644 --- a/config.py +++ b/config.py @@ -174,7 +174,7 @@ def _drop_db(): mongo_client.drop_database(DB_NAME) -KEY = get_key(ID, USERNAME, DOMAIN) +KEY = get_key(ID, ID+"#main-key", USERNAME, DOMAIN) JWT_SECRET = get_secret_key("jwt") diff --git a/utils/key.py b/utils/key.py index e7012ae..4e035f0 100644 --- a/utils/key.py +++ b/utils/key.py @@ -24,9 +24,9 @@ def get_secret_key(name: str, new_key: Callable[[], str] = _new_key) -> str: return f.read() -def get_key(owner: str, user: str, domain: str) -> Key: +def get_key(owner: str, _id: str, user: str, domain: str) -> Key: """"Loads or generates an RSA key.""" - k = Key(owner) + k = Key(owner, _id) user = user.replace(".", "_") domain = domain.replace(".", "_") key_path = os.path.join(KEY_DIR, f"key_{user}_{domain}.pem")