Add field tag for key_id

This commit is contained in:
Neil Alexander 2022-10-06 11:18:00 +01:00
parent 4ed090d9b9
commit 9b48180fb5
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 2 additions and 2 deletions

View file

@ -234,7 +234,7 @@ func loadConfig(
for _, key := range c.Global.OldVerifyKeys { for _, key := range c.Global.OldVerifyKeys {
switch { switch {
case key.KeyID == "": case key.KeyID == "":
return nil, fmt.Errorf("key ID must be specified for old_verify_keys") return nil, fmt.Errorf("key ID must be specified if public_key is specified")
case len(key.PublicKey) == ed25519.PublicKeySize: case len(key.PublicKey) == ed25519.PublicKeySize:
continue continue

View file

@ -131,7 +131,7 @@ type OldVerifyKeys struct {
PublicKey gomatrixserverlib.Base64Bytes `yaml:"public_key"` PublicKey gomatrixserverlib.Base64Bytes `yaml:"public_key"`
// The key ID of the private key. // The key ID of the private key.
KeyID gomatrixserverlib.KeyID `yaml:"-"` KeyID gomatrixserverlib.KeyID `yaml:"key_id"`
// When the private key was designed as "expired", as a UNIX timestamp // When the private key was designed as "expired", as a UNIX timestamp
// in millisecond precision. // in millisecond precision.