aboutsummaryrefslogtreecommitdiff
path: root/client.py
diff options
context:
space:
mode:
authorAnthony Wang2023-01-18 20:06:17 +0000
committerAnthony Wang2023-01-18 20:06:17 +0000
commit315b1c635c584dbd4b7b55c0c2d8e622dbb37862 (patch)
tree64d7ee42acb0891e58e91a79f27a0eeeaa7a47d0 /client.py
parent183267030d756936ae90e8b6cc646a378fe79ff1 (diff)
More code cleanup
Diffstat (limited to 'client.py')
-rw-r--r--client.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/client.py b/client.py
index 346881b..50f6b2f 100644
--- a/client.py
+++ b/client.py
@@ -17,11 +17,7 @@ message = f'date: {date}\ndigest: SHA-256={digest}'
with open('private.pem', 'rb') as f:
privkey = serialization.load_pem_private_key(f.read(), None)
-signature = b64encode(privkey.sign(
- message.encode('utf8'),
- padding.PKCS1v15(),
- hashes.SHA256()
-)).decode()
+signature = b64encode(privkey.sign(message.encode('utf8'), padding.PKCS1v15(), hashes.SHA256())).decode()
header = f'keyId="https://0.exozy.me/users/test.jsonld#main-key",headers="date digest",signature="{signature}"'
resp = post('https://0.exozy.me/users/test.outbox', headers={