Skip to content
Snippets Groups Projects
Commit d18e4ea0 authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Implement room v5 which enforces signing key validity

Implements [MSC2077](https://github.com/matrix-org/matrix-doc/pull/2077) and
fixes #5247 and #4364.
parent 14f13bab
No related branches found
No related tags found
No related merge requests found
Add a new room version where the timestamps on events are checked against the validity periods on signing keys.
...@@ -82,12 +82,12 @@ class RoomVersions(object): ...@@ -82,12 +82,12 @@ class RoomVersions(object):
StateResolutionVersions.V2, StateResolutionVersions.V2,
enforce_key_validity=False, enforce_key_validity=False,
) )
VDH_TEST_KEY_VALIDITY = RoomVersion( V5 = RoomVersion(
"vdh-test-key-validity", "5",
RoomDisposition.UNSTABLE, RoomDisposition.STABLE,
EventFormatVersions.V3, EventFormatVersions.V3,
StateResolutionVersions.V2, StateResolutionVersions.V2,
enforce_key_validity=False, enforce_key_validity=True,
) )
...@@ -97,6 +97,6 @@ KNOWN_ROOM_VERSIONS = { ...@@ -97,6 +97,6 @@ KNOWN_ROOM_VERSIONS = {
RoomVersions.V2, RoomVersions.V2,
RoomVersions.V3, RoomVersions.V3,
RoomVersions.V4, RoomVersions.V4,
RoomVersions.VDH_TEST_KEY_VALIDITY, RoomVersions.V5,
) )
} # type: dict[str, RoomVersion] } # type: dict[str, RoomVersion]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment