mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-21 22:17:59 +00:00
http signatures: handle fetch_actor_key failure more gracefully
This commit is contained in:
parent
42ad51e94a
commit
6e493ca9e1
|
@ -60,11 +60,14 @@ def sign_headers(headers, key, key_id):
|
|||
async def fetch_actor_key(actor):
|
||||
actor_data = await fetch_actor(actor)
|
||||
|
||||
if not actor_data:
|
||||
return None
|
||||
|
||||
if 'publicKey' not in actor_data:
|
||||
return None
|
||||
return None
|
||||
|
||||
if 'publicKeyPem' not in actor_data['publicKey']:
|
||||
return None
|
||||
return None
|
||||
|
||||
return RSA.importKey(actor_data['publicKey']['publicKeyPem'])
|
||||
|
||||
|
|
Loading…
Reference in a new issue