Browse Source

change sing_request signature, adapt authority search

cmd_module
Edoardo Putti 8 years ago
parent
commit
083020ff02
1 changed files with 7 additions and 8 deletions
  1. +7
    -8
      ca_manager.py

+ 7
- 8
ca_manager.py View File

@ -195,17 +195,16 @@ def list_cas(ca_manager):
for ca_id, ca_name, ca_type in ca_manager.get_cas_list():
print("- [%3s] %-15s (%s)" % (ca_type, ca_id, ca_name))
def sign_request(ca_manager, choosen_request, choosen_ca):
def sign_request(ca_manager):
global RESULTS_PATH
list_cas(ca_manager)
ca_selection = input('Select a CA> ')
authorities = ca_manager.get_cas_list()
try:
authority = ca_manager.get_ca(ca_selection)
except:
print("Could not find CA '%s'" % ca_selection)
ca_selection = int(choosen_ca)
(authority_id, authority_name, authority_type) = authorities[ca_selection]
authority = ca_manager.get_ca(authority_name)
except IndexError:
print("Could not find CA '%d'" % choosen_ca)
return
requests = ca_manager.get_requests()


Loading…
Cancel
Save