mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:26:01 -04:00
Remove tls_fingerprints option (#9280)
Signed-off-by: Jerin J Titus <72017981+jerinjtitus@users.noreply.github.com>
This commit is contained in:
parent
82eacb0e07
commit
057ce7b754
6 changed files with 1 additions and 95 deletions
|
@ -1,4 +1,3 @@
|
|||
import hashlib
|
||||
import json
|
||||
import sys
|
||||
import time
|
||||
|
@ -54,15 +53,9 @@ def convert_v1_to_v2(server_name, valid_until, keys, certificate):
|
|||
"server_name": server_name,
|
||||
"verify_keys": {key_id: {"key": key} for key_id, key in keys.items()},
|
||||
"valid_until_ts": valid_until,
|
||||
"tls_fingerprints": [fingerprint(certificate)],
|
||||
}
|
||||
|
||||
|
||||
def fingerprint(certificate):
|
||||
finger = hashlib.sha256(certificate)
|
||||
return {"sha256": encode_base64(finger.digest())}
|
||||
|
||||
|
||||
def rows_v2(server, json):
|
||||
valid_until = json["valid_until_ts"]
|
||||
key_json = encode_canonical_json(json)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue