1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-09 02:10:10 +08:00

Remove debugging logs in EcdhInitialPublicKeyUpdater

This commit is contained in:
Him188 2022-06-04 15:02:23 +01:00
parent 48e8268461
commit 1fb3305659
No known key found for this signature in database
GPG Key ID: BA439CDDCF652375

View File

@ -92,17 +92,14 @@ internal class EcdhInitialPublicKeyUpdaterImpl(
@Suppress("DEPRECATION", "DEPRECATION_ERROR")
withTimeout(10.seconds) { Mirai.Http.get<String>("https://keyrotate.qq.com/rotate_key?cipher_suite_ver=305&uin=${bot.client.uin}") }
val resp = json.decodeFromString(ServerRespPOJO.serializer(), respStr)
println("check2")
resp.pubKeyMeta.let { meta ->
val isValid = ECDH.verifyPublicKey(
version = meta.keyVer,
publicKey = meta.pubKey,
publicKeySign = meta.pubKeySign
)
println("check1")
check(isValid) { "Ecdh public key which from server is invalid" }
logger.info("Successfully fetched ecdh public key from server.")
println("check3")
ECDHInitialPublicKey(meta.keyVer, meta.pubKey, currentTimeSeconds() + resp.querySpan)
}
}