From 33fbeba70b1b4b1abcaf63f5ac3c70ffc7ca8b30 Mon Sep 17 00:00:00 2001 From: Edoardo Putti Date: Sat, 29 Oct 2016 17:10:44 +0200 Subject: [PATCH] add pickling to ca generation --- authority.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/authority.py b/authority.py index f69c829..56bfc03 100755 --- a/authority.py +++ b/authority.py @@ -81,6 +81,10 @@ 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) + else: raise ValueError('A CA with the same id and type already exists')