Browse Source

fix typo in ssh authority dir, pickle authority on creation

master
Edoardo Putti 8 years ago
parent
commit
23fb8b9c40
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      authority.py

+ 3
- 4
authority.py View File

@ -54,7 +54,7 @@ class SSHAuthority(Authority):
host_validity = '+52w' host_validity = '+52w'
def __init__(self, ca_id): 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) super(SSHAuthority, self).__init__(ca_id, ssh_ca_dir)
@ -86,9 +86,8 @@ class SSHAuthority(Authority):
with open(self.path + '.serial', 'w') as stream: with open(self.path + '.serial', 'w') as stream:
stream.write(str(0)) 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: else:
raise ValueError('A CA with the same id and type already exists') raise ValueError('A CA with the same id and type already exists')


Loading…
Cancel
Save