util.registry.torrent: stash kid in JWT headers
Upstream, chihaya reads this header in order to find the kid in the list of maintained keys. A long time ago, it used to just iterate, but now it needs to know the kid.
This commit is contained in:
parent
7d07c2ed07
commit
a16b469d9b
1 changed files with 2 additions and 1 deletions
|
@ -40,7 +40,8 @@ def jwt_from_infohash(infohash_digest):
|
|||
'aud': ANNOUNCE_URL,
|
||||
'infohash': hexlify(infohash_digest),
|
||||
}
|
||||
return jwt.encode(token_data, instance_keys.local_private_key, 'RS256')
|
||||
return jwt.encode(token_data, instance_keys.local_private_key, algorithm='RS256',
|
||||
headers={'kid': instance_keys.local_key_id})
|
||||
|
||||
|
||||
def make_torrent(name, webseed, length, piece_length, pieces):
|
||||
|
|
Reference in a new issue