diff --git a/monkey/monkey_island/cc/server_setup.py b/monkey/monkey_island/cc/server_setup.py index fbd61982a..63918f567 100644 --- a/monkey/monkey_island/cc/server_setup.py +++ b/monkey/monkey_island/cc/server_setup.py @@ -83,7 +83,7 @@ def _start_island_server(should_setup_only, config_options: IslandConfigOptions) populate_exporter_list() app = init_app(MONGO_URL) - crt_path, key_path = setup_certificate(config_options) + crt_path, key_path = setup_certificate(config_options.crt_path, config_options.key_path) init_collections() diff --git a/monkey/monkey_island/cc/setup/certificate_setup.py b/monkey/monkey_island/cc/setup/certificate_setup.py index 1eaab4f04..273bbee1b 100644 --- a/monkey/monkey_island/cc/setup/certificate_setup.py +++ b/monkey/monkey_island/cc/setup/certificate_setup.py @@ -4,15 +4,11 @@ from monkey_island.cc.services.utils.file_handling import ( ensure_file_existence, ensure_file_permissions, ) -from monkey_island.cc.setup.island_config_options import IslandConfigOptions logger = logging.getLogger(__name__) -def setup_certificate(config_options: IslandConfigOptions) -> (str, str): - crt_path = config_options.crt_path - key_path = config_options.key_path - +def setup_certificate(crt_path: str, key_path: str) -> (str, str): for file in [crt_path, key_path]: ensure_file_existence(file) ensure_file_permissions(file)