0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-15 02:43:46 +01:00

Try that again

This commit is contained in:
Neil Alexander 2022-04-25 17:36:33 +01:00
parent e94b989f37
commit ce4d0a9789
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -363,7 +363,8 @@ func (a *KeyInternalAPI) processSelfSignatures(
switch sig := signature.CrossSigningBody.(type) {
case *gomatrixserverlib.CrossSigningKey:
for keyID := range sig.Keys {
if gomatrixserverlib.KeyID(strings.SplitN(string(keyID), ":", 1)[1]) == keyID {
split := strings.SplitN(string(keyID), ":", 2)
if len(split) > 1 && gomatrixserverlib.KeyID(split[1]) == keyID {
targetKeyID = keyID // contains the ed25519: or other scheme
break
}
@ -380,7 +381,8 @@ func (a *KeyInternalAPI) processSelfSignatures(
case *gomatrixserverlib.DeviceKeys:
for keyID := range sig.Keys {
if gomatrixserverlib.KeyID(strings.SplitN(string(keyID), ":", 1)[1]) == keyID {
split := strings.SplitN(string(keyID), ":", 2)
if len(split) > 1 && gomatrixserverlib.KeyID(split[1]) == keyID {
targetKeyID = keyID // contains the ed25519: or other scheme
break
}