Browse Source

log only to file, sign cli in ca_manager.py

readme
Andrea Cimbalo 8 years ago
parent
commit
72e75083f4
2 changed files with 16 additions and 22 deletions
  1. +16
    -2
      ca_manager.py
  2. +0
    -20
      cli.py

+ 16
- 2
ca_manager.py View File

@ -13,8 +13,6 @@ import tempfile
from certificate_requests import * from certificate_requests import *
from paths import * from paths import *
class CAManager(object): class CAManager(object):
""" """
Middleware to interact with ssh-keygen Middleware to interact with ssh-keygen
@ -232,3 +230,19 @@ def sign_request(ca_manager, request_name, authority_name):
ca_manager.drop_request(request) ca_manager.drop_request(request)
shutil.copy(cert_path, os.path.join(RESULTS_PATH, request.req_id)) 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()

+ 0
- 20
cli.py View File

@ -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()

Loading…
Cancel
Save