From b3841c1da6c76bda1a82e31028bcf16872c3a26c Mon Sep 17 00:00:00 2001 From: Sergi Delgado Segura Date: Thu, 9 Apr 2020 17:48:07 +0200 Subject: [PATCH] Updates defaults names --- watchtower-plugin/keys.py | 4 ++-- watchtower-plugin/watchtower.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/watchtower-plugin/keys.py b/watchtower-plugin/keys.py index 92d9ace..17d374c 100644 --- a/watchtower-plugin/keys.py +++ b/watchtower-plugin/keys.py @@ -45,7 +45,7 @@ def generate_keys(data_dir): # Create the output folder it it does not exist (and all the parents if they don't either) Path(data_dir).mkdir(parents=True, exist_ok=True) - sk_file_name = os.path.join(data_dir, "cli_sk.der") + sk_file_name = os.path.join(data_dir, "sk.der") if os.path.exists(sk_file_name): raise FileExistsError("The client key pair already exists") @@ -78,7 +78,7 @@ def load_keys(data_dir): if not isinstance(data_dir, str): raise ValueError("Invalid data_dir. Please check your settings") - sk_file_path = os.path.join(data_dir, "cli_sk.der") + sk_file_path = os.path.join(data_dir, "sk.der") cli_sk_der = Cryptographer.load_key_file(sk_file_path) cli_sk = Cryptographer.load_private_key_der(cli_sk_der) diff --git a/watchtower-plugin/watchtower.py b/watchtower-plugin/watchtower.py index 95f68f5..624c842 100755 --- a/watchtower-plugin/watchtower.py +++ b/watchtower-plugin/watchtower.py @@ -14,14 +14,14 @@ from net.http import post_request, process_post_response from exceptions import TowerConnectionError, TowerResponseError, InvalidParameter -DATA_DIR = os.path.expanduser("~/.teos_cli/") -CONF_FILE_NAME = "teos_cli.conf" +DATA_DIR = os.path.expanduser("~/.watchtower/") +CONF_FILE_NAME = "watchtower.conf" DEFAULT_CONF = { "DEFAULT_PORT": {"value": 9814, "type": int}, "APPOINTMENTS_FOLDER_NAME": {"value": "appointment_receipts", "type": str, "path": True}, "TOWERS_DB": {"value": "towers", "type": str, "path": True}, - "CLI_PRIVATE_KEY": {"value": "cli_sk.der", "type": str, "path": True}, + "PRIVATE_KEY": {"value": "sk.der", "type": str, "path": True}, }