Browse Source

add pickling to ca generation

master
Edoardo Putti 8 years ago
parent
commit
33fbeba70b
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      authority.py

+ 4
- 0
authority.py View File

@ -81,6 +81,10 @@ 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)
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