Browse Source

add shell command to generate ssh ca

cmd_module
Edoardo Putti 8 years ago
parent
commit
13b3998ffa
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      ca_shell.py

+ 9
- 0
ca_shell.py View File

@ -24,6 +24,15 @@ class CAManagerShell(cmd.Cmd, object):
'Show certification authority information: SHOW_CA'
raise NotImplementedError()
def do_gen_ssh_ca(self, l):
'Generate a SSH certification authority: GEN_SSH_CA id name'
try:
[ca_id, ca_name] = l.split(" ", 2)[:2]
self.ca_manager.create_ssh_ca(ca_id, ca_name)
except ValueError:
print "Malformed input: %s" % l
def do_quit(self, l):
'Quit this shell'
return True

Loading…
Cancel
Save