aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2021-06-03 16:15:00 +0200
committerLinus Nordberg <linus@nordberg.se>2021-06-03 16:15:00 +0200
commit142fa5c8d564f6288bfa3231cf492dcb3d59d752 (patch)
tree485975e898266dd64aae385f5482d1368f7dc128
parent58ae1f824cf6df237849bd6666b5615808f47468 (diff)
readability
-rwxr-xr-xsiglog-witness.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/siglog-witness.py b/siglog-witness.py
index 06a2c9c..3dd4422 100755
--- a/siglog-witness.py
+++ b/siglog-witness.py
@@ -302,7 +302,8 @@ def ensure_sigkey(fn):
except FileNotFoundError:
print("INFO: Signing key file {} not found -- generating new signing key".format(fn))
signing_key = nacl.signing.SigningKey.generate()
- print("INFO: verification key: {}".format(signing_key.verify_key.encode(nacl.encoding.HexEncoder).decode('ascii')))
+ verify_key = signing_key.verify_key
+ print("INFO: verification key: {}".format(verify_key.encode(nacl.encoding.HexEncoder).decode('ascii')))
with open(fn, 'w') as f:
os.chmod(f.fileno(), S_IRUSR)
f.write(signing_key.encode(encoder=nacl.encoding.HexEncoder).decode('ascii'))