mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Make StrictValidityChecking
a function (#3092)
Companion PR to https://github.com/matrix-org/gomatrixserverlib/pull/388
This commit is contained in:
parent
d11da6ec7c
commit
725ff5567d
15 changed files with 145 additions and 252 deletions
|
@ -28,7 +28,7 @@ func (c Caches) GetServerKey(
|
|||
) (gomatrixserverlib.PublicKeyLookupResult, bool) {
|
||||
key := fmt.Sprintf("%s/%s", request.ServerName, request.KeyID)
|
||||
val, found := c.ServerKeys.Get(key)
|
||||
if found && !val.WasValidAt(timestamp, true) {
|
||||
if found && !val.WasValidAt(timestamp, gomatrixserverlib.StrictValiditySignatureCheck) {
|
||||
// The key wasn't valid at the requested timestamp so don't
|
||||
// return it. The caller will have to work out what to do.
|
||||
c.ServerKeys.Unset(key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue