`verify_event` has been changed recently to be more aligned with the
spec. In the previous algorithm, it returned an error if the event was
not signed by at least one of the required entities.
The new algortihm is iterating over all the signtures for the required
entities *and* skipping unknown algorithms. If an event is signed only
by unkonwn algorithms, the event would be accepted and not verifications
will happen. In order to prevent that, we check that, at least, a single
key is checked. This covers the 2nd point in: https://spec.matrix.org/v1.6/appendices/#checking-for-a-signature
A few more test cases were added:
- The event is properly signed, but key map contains a key with an
unknown algorithm. Under this circumstances, the event should be
allowed.
- An event signed by multiple keys for an entity, should verify all
those signatures
- An event signed by a single key with an unkown algorithm by the
required entity, should fail