diff --git a/ca_manager.py b/ca_manager.py index e00534c..f6ff82f 100755 --- a/ca_manager.py +++ b/ca_manager.py @@ -13,8 +13,6 @@ import tempfile from certificate_requests import * from paths import * - - class CAManager(object): """ Middleware to interact with ssh-keygen @@ -232,3 +230,19 @@ def sign_request(ca_manager, request_name, authority_name): ca_manager.drop_request(request) shutil.copy(cert_path, os.path.join(RESULTS_PATH, request.req_id)) + + +if __name__ == '__main__': + from ca_shell import CAManagerShell + + init_manager([ + MANAGER_PATH, + REQUESTS_PATH, + OUTPUT_PATH, + RESULTS_PATH, + ]) + + + with CAManager(MANAGER_PATH) as ca_manager: + + CAManagerShell(ca_manager).cmdloop() diff --git a/cli.py b/cli.py deleted file mode 100755 index e0c9501..0000000 --- a/cli.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -from ca_shell import CAManagerShell -from ca_manager import CAManager, init_manager -from paths import * - -if __name__ == '__main__': - - init_manager([ - MANAGER_PATH, - REQUESTS_PATH, - OUTPUT_PATH, - RESULTS_PATH, - ]) - - - with CAManager(MANAGER_PATH) as ca_manager: - - CAManagerShell(ca_manager).cmdloop()