mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Updates defaults names
This commit is contained in:
@@ -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)
|
# 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)
|
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):
|
if os.path.exists(sk_file_name):
|
||||||
raise FileExistsError("The client key pair already exists")
|
raise FileExistsError("The client key pair already exists")
|
||||||
@@ -78,7 +78,7 @@ def load_keys(data_dir):
|
|||||||
if not isinstance(data_dir, str):
|
if not isinstance(data_dir, str):
|
||||||
raise ValueError("Invalid data_dir. Please check your settings")
|
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_der = Cryptographer.load_key_file(sk_file_path)
|
||||||
cli_sk = Cryptographer.load_private_key_der(cli_sk_der)
|
cli_sk = Cryptographer.load_private_key_der(cli_sk_der)
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ from net.http import post_request, process_post_response
|
|||||||
from exceptions import TowerConnectionError, TowerResponseError, InvalidParameter
|
from exceptions import TowerConnectionError, TowerResponseError, InvalidParameter
|
||||||
|
|
||||||
|
|
||||||
DATA_DIR = os.path.expanduser("~/.teos_cli/")
|
DATA_DIR = os.path.expanduser("~/.watchtower/")
|
||||||
CONF_FILE_NAME = "teos_cli.conf"
|
CONF_FILE_NAME = "watchtower.conf"
|
||||||
|
|
||||||
DEFAULT_CONF = {
|
DEFAULT_CONF = {
|
||||||
"DEFAULT_PORT": {"value": 9814, "type": int},
|
"DEFAULT_PORT": {"value": 9814, "type": int},
|
||||||
"APPOINTMENTS_FOLDER_NAME": {"value": "appointment_receipts", "type": str, "path": True},
|
"APPOINTMENTS_FOLDER_NAME": {"value": "appointment_receipts", "type": str, "path": True},
|
||||||
"TOWERS_DB": {"value": "towers", "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},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user