mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
Update Telegram's RSA keys
This commit is contained in:
@@ -56,6 +56,14 @@ async def do_authentication(sender):
|
||||
target_fingerprint = fingerprint
|
||||
break
|
||||
|
||||
if cipher_text is None:
|
||||
# Second attempt, but now we're allowed to use old keys
|
||||
for fingerprint in res_pq.server_public_key_fingerprints:
|
||||
cipher_text = rsa.encrypt(fingerprint, pq_inner_data, use_old=True)
|
||||
if cipher_text is not None:
|
||||
target_fingerprint = fingerprint
|
||||
break
|
||||
|
||||
if cipher_text is None:
|
||||
raise SecurityError(
|
||||
'Step 2 could not find a valid key for fingerprints: {}'
|
||||
|
Reference in New Issue
Block a user