From 13b3998ffac04d9d47f485697e59fe1173f5547f Mon Sep 17 00:00:00 2001 From: Edoardo Putti Date: Sat, 20 Aug 2016 01:12:07 +0200 Subject: [PATCH] add shell command to generate ssh ca --- ca_shell.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ca_shell.py b/ca_shell.py index 69a54d8..fb2ad38 100755 --- a/ca_shell.py +++ b/ca_shell.py @@ -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