summary refs log tree commit diff
path: root/synapse/crypto/event_signing.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use immutabledict instead of frozendict (#15113)David Robertson2023-03-221-1/+1
| | | | | | | | | | Additionally: * Consistently use `freeze()` in test --------- Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
* Instrument `_check_sigs_and_hash_and_fetch` to trace time spent in child ↵Eric Eastwood2022-08-231-0/+2
| | | | | | | | | concurrent calls (#13588) Instrument `_check_sigs_and_hash_and_fetch` to trace time spent in child concurrent calls because I've see `_check_sigs_and_hash_and_fetch` take [10.41s to process 100 events](https://github.com/matrix-org/synapse/issues/13587) Fix https://github.com/matrix-org/synapse/issues/13587 Part of https://github.com/matrix-org/synapse/issues/13356
* Add missing type hints to synapse.crypto. (#11146)Patrick Cloke2021-10-211-1/+1
| | | And require type hints for this module.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Add type hints to the crypto module. (#8999)Patrick Cloke2021-01-041-11/+18
|
* Remove special auth and redaction rules for aliases events in experimental ↵Patrick Cloke2020-03-091-1/+1
| | | | room ver. (#7037)
* pass room_version into compute_event_signature (#6807)Richard van der Hoff2020-01-311-8/+20
|
* Pass room_version into add_hashes_and_signaturesRichard van der Hoff2020-01-301-7/+13
|
* Fix some test failures when frozen_dicts are enabled (#6642)Richard van der Hoff2020-01-061-3/+6
| | | | Fixes #4026
* Don't encode object as UTF-8 string if not needed.Michael Kaye2019-10-241-2/+4
| | | | | I believe that string formatting ~10-15 sized events will take a proportion of CPU time.
* Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-2/+2
| | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
* Run Black. (#5482)Amber Brown2019-06-201-11/+6
|
* Clean up debug logging (#5347)Richard van der Hoff2019-06-051-1/+5
| | | Remove some spurious stuff, clarify some other stuff
* Make add_hashes_and_signatures operate on dictsErik Johnston2019-01-291-10/+6
|
* Refactor event signing to work on dictsErik Johnston2019-01-281-30/+69
| | | | | | This is in preparation for making EventBuilder format agnostic, which means event signing should be done against the event dict rather than the EventBuilder object.
* run isortAmber Brown2018-07-091-5/+5
|
* Fix 500 when joining matrix-devRichard van der Hoff2017-11-291-3/+10
| | | | | | | matrix-dev has an event (`$/6ANj/9QWQyd71N6DpRQPf+SDUu11+HVMeKSpMzBCwM:zemos.net`) which has no `hashes` member. Check for missing `hashes` element in events.
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-1/+1
| | | | what could possibly go wrong
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Remove syutil dependency in favour of smaller single-purpose librariesMark Haines2015-08-241-4/+5
|
* Update copyright noticesMark Haines2015-01-061-1/+1
|
* Try and figure out how and why signatures are being changed.Erik Johnston2014-12-101-1/+2
|
* More bug fixesErik Johnston2014-12-081-1/+1
|
* Convert rest and handlers to use new event structureErik Johnston2014-12-041-1/+1
|
* WIP for new way of managing events.Erik Johnston2014-12-031-18/+21
|
* Use module loggers rather than the root logger. Exceptions caused by bad ↵Mark Haines2014-11-201-1/+1
| | | | clients shouldn't cause ERROR level logging. Fix sql logging to use 'repr' rather than 'str'
* Merge PDUs and Events into one objectMark Haines2014-11-141-12/+3
|
* Fix PDU and event signaturesMark Haines2014-11-141-1/+10
|
* Validate signatures on incoming eventsMark Haines2014-11-141-4/+14
|
* Tidy up some of the unused sql tablesErik Johnston2014-11-101-2/+0
|
* Finish redaction algorithm.Erik Johnston2014-11-101-5/+2
|
* Add hash of current state to eventsErik Johnston2014-11-071-1/+10
|
* Fix bugs in generating event signatures and hashingErik Johnston2014-11-031-62/+38
|
* Don't assume event has hashes key alreadyErik Johnston2014-11-031-0/+2
|
* Sign evnetsErik Johnston2014-10-311-0/+20
|
* Make prev_event signing work again.Erik Johnston2014-10-311-1/+12
|
* fix pyflakes warningsMark Haines2014-10-271-4/+4
|
* Remove signatures from pdu when computing hashes to use for prev pdus, make ↵Mark Haines2014-10-171-1/+5
| | | | sure is_state is a boolean.
* Rename 'meta' to 'unsigned'Mark Haines2014-10-171-1/+3
|
* Hash the same content covered by the signature when referencing previous ↵Mark Haines2014-10-171-5/+14
| | | | PDUs rather than reusing the PDU content hashes
* Sign outgoing PDUs.Mark Haines2014-10-161-2/+2
|
* persist hashes and origin signatures for PDUsMark Haines2014-10-151-0/+70