mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-24 19:20:30 +08:00
[core] Add qimei36 key for EncryptServiceContext
This commit is contained in:
parent
390726ff4d
commit
644eddd4d9
@ -123,6 +123,7 @@ internal class EcdhInitialPublicKeyUpdaterImpl(
|
||||
set(EncryptServiceContext.KEY_CHANNEL_PROXY, createChannelProxy(bot))
|
||||
set(EncryptServiceContext.KEY_DEVICE_INFO, bot.client.device)
|
||||
set(EncryptServiceContext.KEY_BOT_PROTOCOL, bot.configuration.protocol)
|
||||
set(EncryptServiceContext.KEY_QIMEI36, bot.client.qimei36 ?: "")
|
||||
}))
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,6 @@ internal open class SsoProcessorImpl(
|
||||
|
||||
components[CacheValidator].validate()
|
||||
components[BdhSessionSyncer].loadServerListFromCache()
|
||||
components[EcdhInitialPublicKeyUpdater].initializeSsoSecureEcdh()
|
||||
|
||||
try {
|
||||
ssoContext.bot.requestQimei(qimeiLogger)
|
||||
@ -221,6 +220,9 @@ internal open class SsoProcessorImpl(
|
||||
qimeiLogger.warning("Cannot get qimei from server.", exception)
|
||||
}
|
||||
|
||||
// trpc ecdh service needs qimei to init
|
||||
components[EcdhInitialPublicKeyUpdater].initializeSsoSecureEcdh()
|
||||
|
||||
// try fast login
|
||||
if (client.wLoginSigInfoInitialized) {
|
||||
ssoContext.bot.components[EcdhInitialPublicKeyUpdater].refreshInitialPublicKeyAndApplyEcdh()
|
||||
|
@ -325,6 +325,7 @@ internal inline fun BytePacketBuilder.writeSsoPacket(
|
||||
EncryptServiceContext(client.uin, buildTypeSafeMap {
|
||||
set(EncryptServiceContext.KEY_APP_QUA, "V1_AND_SQ_8.9.58_4106_YYB_D") // 8.9.58
|
||||
set(EncryptServiceContext.KEY_CHANNEL_PROXY, createChannelProxy(client.bot))
|
||||
set(EncryptServiceContext.KEY_QIMEI36, client.qimei36 ?: "")
|
||||
}),
|
||||
sequenceId,
|
||||
commandName,
|
||||
|
@ -32,6 +32,7 @@ public class EncryptServiceContext @MiraiInternalApi constructor(
|
||||
public val KEY_APP_QUA: TypeKey<String> = TypeKey("KEY_APP_QUA")
|
||||
public val KEY_CHANNEL_PROXY: TypeKey<EncryptService.ChannelProxy> = TypeKey("KEY_CHANNEL_PROXY")
|
||||
public val KEY_DEVICE_INFO: TypeKey<DeviceInfo> = TypeKey("KEY_DEVICE_INFO")
|
||||
public val KEY_QIMEI36: TypeKey<String> = TypeKey("KEY_QIMEI36")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user