mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
Tweaks
This commit is contained in:
parent
c180fea5db
commit
0c131bf333
|
|
@ -432,14 +432,11 @@ func (a *KeyInternalAPI) processOtherSignatures(
|
||||||
// For each key ID, write the signatures. Maybe there'll be more
|
// For each key ID, write the signatures. Maybe there'll be more
|
||||||
// than one algorithm in the future so it's best not to focus on
|
// than one algorithm in the future so it's best not to focus on
|
||||||
// everything being ed25519:.
|
// everything being ed25519:.
|
||||||
var targetKeyID gomatrixserverlib.KeyID
|
for targetKeyID, suppliedKeyData := range sig.Keys {
|
||||||
for keyID, suppliedKeyData := range sig.Keys {
|
|
||||||
targetKeyID = keyID
|
|
||||||
|
|
||||||
// The master key will be supplied in the request, but we should
|
// The master key will be supplied in the request, but we should
|
||||||
// make sure that it matches what we think the master key should
|
// make sure that it matches what we think the master key should
|
||||||
// actually be.
|
// actually be.
|
||||||
localKeyData, lok := masterKey.Keys[keyID]
|
localKeyData, lok := masterKey.Keys[targetKeyID]
|
||||||
if !lok {
|
if !lok {
|
||||||
return fmt.Errorf("uploaded master key for user %q doesn't match local copy", targetUserID)
|
return fmt.Errorf("uploaded master key for user %q doesn't match local copy", targetUserID)
|
||||||
} else if !bytes.Equal(suppliedKeyData, localKeyData) {
|
} else if !bytes.Equal(suppliedKeyData, localKeyData) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue