From 23fb8b9c4021b3ea91c07edba3592e3cf175a92f Mon Sep 17 00:00:00 2001 From: Edoardo Putti Date: Sat, 29 Oct 2016 19:52:48 +0200 Subject: [PATCH] fix typo in ssh authority dir, pickle authority on creation --- authority.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/authority.py b/authority.py index ef0b2fc..30fa130 100755 --- a/authority.py +++ b/authority.py @@ -54,7 +54,7 @@ class SSHAuthority(Authority): host_validity = '+52w' def __init__(self, ca_id): - ssh_ca_dir = os.path.join(MANAGER_PATH, 'ssh_ca') + ssh_ca_dir = os.path.join(MANAGER_PATH, 'ssh_cas') super(SSHAuthority, self).__init__(ca_id, ssh_ca_dir) @@ -86,9 +86,8 @@ class SSHAuthority(Authority): with open(self.path + '.serial', 'w') as stream: stream.write(str(0)) - pickled_path = os.path.join(MANAGER_PATH, self.ca_id) - with open(pickled_path, 'wb') as out: - pickle.dump(self, out) + super(SSHAuthority, self).generate() + else: raise ValueError('A CA with the same id and type already exists')