forked from p15670423/monkey
Pass file paths to setup_certificate() instead of IslandConfigOptions
This commit is contained in:
parent
42a9a79800
commit
4f601ca5dc
|
@ -83,7 +83,7 @@ def _start_island_server(should_setup_only, config_options: IslandConfigOptions)
|
||||||
populate_exporter_list()
|
populate_exporter_list()
|
||||||
app = init_app(MONGO_URL)
|
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()
|
init_collections()
|
||||||
|
|
||||||
|
|
|
@ -4,15 +4,11 @@ from monkey_island.cc.services.utils.file_handling import (
|
||||||
ensure_file_existence,
|
ensure_file_existence,
|
||||||
ensure_file_permissions,
|
ensure_file_permissions,
|
||||||
)
|
)
|
||||||
from monkey_island.cc.setup.island_config_options import IslandConfigOptions
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def setup_certificate(config_options: IslandConfigOptions) -> (str, str):
|
def setup_certificate(crt_path: str, key_path: str) -> (str, str):
|
||||||
crt_path = config_options.crt_path
|
|
||||||
key_path = config_options.key_path
|
|
||||||
|
|
||||||
for file in [crt_path, key_path]:
|
for file in [crt_path, key_path]:
|
||||||
ensure_file_existence(file)
|
ensure_file_existence(file)
|
||||||
ensure_file_permissions(file)
|
ensure_file_permissions(file)
|
||||||
|
|
Loading…
Reference in New Issue