Fix serialization issue during registration.
This commit is contained in:
parent
bb7ee5915c
commit
cea8546ce5
2 changed files with 7 additions and 3 deletions
|
@ -4,6 +4,7 @@ import androidx.annotation.VisibleForTesting
|
|||
import org.signal.core.util.logging.Log
|
||||
import org.signal.core.util.roundedString
|
||||
import org.signal.libsignal.protocol.InvalidKeyException
|
||||
import org.signal.libsignal.protocol.InvalidKeyIdException
|
||||
import org.signal.libsignal.protocol.state.KyberPreKeyRecord
|
||||
import org.signal.libsignal.protocol.state.PreKeyRecord
|
||||
import org.signal.libsignal.protocol.state.SignalProtocolStore
|
||||
|
@ -269,7 +270,10 @@ class PreKeysSyncJob private constructor(
|
|||
lastResortKyberKey = protocolStore.loadKyberPreKey(metadataStore.lastResortKyberPreKeyId).keyPair.publicKey
|
||||
)
|
||||
} catch (e: InvalidKeyException) {
|
||||
Log.w(TAG, "Unable to load keys", e)
|
||||
Log.w(TAG, "Unable to load keys.", e)
|
||||
return false
|
||||
} catch (e: InvalidKeyIdException) {
|
||||
Log.w(TAG, "Unable to load keys.", e)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ object LocalRegistrationMetadataUtil {
|
|||
return LocalRegistrationMetadata.Builder().apply {
|
||||
aciIdentityKeyPair = localAciIdentityKeyPair.serialize().toByteString()
|
||||
aciSignedPreKey = remoteResult.aciPreKeyCollection.signedPreKey.serialize().toByteString()
|
||||
aciLastRestoreKyberPreKey = remoteResult.aciPreKeyCollection.signedPreKey.serialize().toByteString()
|
||||
aciLastRestoreKyberPreKey = remoteResult.aciPreKeyCollection.lastResortKyberPreKey.serialize().toByteString()
|
||||
pniIdentityKeyPair = localPniIdentityKeyPair.serialize().toByteString()
|
||||
pniSignedPreKey = remoteResult.pniPreKeyCollection.signedPreKey.serialize().toByteString()
|
||||
pniLastRestoreKyberPreKey = remoteResult.pniPreKeyCollection.signedPreKey.serialize().toByteString()
|
||||
pniLastRestoreKyberPreKey = remoteResult.pniPreKeyCollection.lastResortKyberPreKey.serialize().toByteString()
|
||||
aci = remoteResult.uuid
|
||||
pni = remoteResult.pni
|
||||
hasPin = remoteResult.storageCapable
|
||||
|
|
Loading…
Add table
Reference in a new issue