Commit 18b17f91 authored by kaniini's avatar kaniini

http signatures: hold actor keys in an LRU cache

parent 950cd1e7
......@@ -7,6 +7,8 @@ from Crypto.PublicKey import RSA
from Crypto.Hash import SHA, SHA256, SHA512
from Crypto.Signature import PKCS1_v1_5
from async_lru import alru_cache
from .remote_actor import fetch_actor
......@@ -57,6 +59,7 @@ def sign_headers(headers, key, key_id):
return ','.join(chunks)
async def fetch_actor_key(actor):
actor_data = await fetch_actor(actor)
......@@ -10,3 +10,4 @@ PyYAML==3.13
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment