Commit graph

104 commits

Author SHA1 Message Date
Bruno Windels 07bc0a2376 move observable values each in their own file 2022-03-29 12:01:46 +02:00
Bruno Windels 7aeda70ff6 convert DecryptionResult 2022-02-15 18:20:14 +01:00
Bruno Windels 00c5e747d2 log total backed up keys during flush operation 2022-02-01 12:30:45 +01:00
Bruno Windels 02f06724d0 don't block reenabling 4s if already enabled 2022-02-01 11:26:00 +01:00
Bruno Windels 9c599d53aa allow to inject max delay in key backup 2022-01-31 17:31:01 +01:00
Bruno Windels 62acd458c6 also ask for new key if backup version is not found 2022-01-31 17:30:51 +01:00
Bruno Windels 17275a5390 backup 200 keys per request 2022-01-31 17:30:15 +01:00
Bruno Windels 830786b2fd fixes and cleanup 2022-01-31 16:26:14 +01:00
Bruno Windels 6541aacf98 don't discount already finished keys in total for previous iterations 2022-01-31 16:23:48 +01:00
Bruno Windels a757fb3696 better error handling in key backup, cleanup and not overuse observables 2022-01-31 14:37:05 +01:00
Bruno Windels ae5cc17290 mark all inbound sessions to be backed up again when changing version 2022-01-31 14:36:04 +01:00
Bruno Windels 7d3e3b992b some more typing 2022-01-28 13:14:38 +01:00
Bruno Windels b692b3ec4f move key backup operation and flush bookkeeping inside KeyBackup
so we can flush from other places than Session
2022-01-28 13:13:23 +01:00
Bruno Windels ebc7f1ecd7 needs to be awaited 2022-01-28 13:11:52 +01:00
Bruno Windels a499689bd8 also write room key that we create ourselves with RoomKey infrastructure
so all keys are written in one place and the flags are always correct
2022-01-28 13:10:48 +01:00
Bruno Windels c81dde53e7 store key source in inbound session 2022-01-28 10:03:30 +01:00
Bruno Windels dd2b41ff95 use backup flag in key backup rather than separate store 2022-01-27 16:07:18 +01:00
Bruno Windels 6f1484005b stop key backup when on the wrong version
users can then enter the new key in the settings to start backing up
again
2022-01-27 15:14:29 +01:00
Bruno Windels 0b4954a9ca log key backup upload requests 2022-01-27 14:20:04 +01:00
Bruno Windels 60ed276b8a add progress notification and cancellation to key backup flush 2022-01-26 15:19:31 +01:00
Bruno Windels a791641b34 move types to separate file 2022-01-26 12:10:20 +01:00
Bruno Windels 85155a43bb cleanup types 2022-01-26 10:17:31 +01:00
Bruno Windels cfb94206f9 move curve25519 code to separate file 2022-01-26 10:13:01 +01:00
Bruno Windels 86caa5f9b1 rename session backup to key backup to be consistent with RoomKey 2022-01-26 09:51:48 +01:00
Bruno Windels 933a1b4636 draft of session backup writing + some refactoring 2022-01-25 18:48:19 +01:00
Bruno Windels a3e294bb60 small cleanup 2022-01-25 18:45:39 +01:00
Bruno Windels 993a86ddb2 convert SessionBackup to typescript and pass in keyloader 2022-01-20 11:16:08 +01:00
Bruno Windels a4d924acd1 make KeyLoader use proper olm types 2022-01-20 11:15:48 +01:00
RMidhunSuresh 88ec1b575d Convert mergeMap.js to ts 2021-11-17 20:28:44 +05:30
Bruno Windels 695996d6e2 add ILogger and ILogExport interface, to give export correct return type
also move logging related types to own file
2021-11-17 11:39:12 +01:00
RMidhunSuresh 30a384fe1e Make LogFilter optional 2021-11-15 18:44:25 +05:30
RMidhunSuresh 520e0f1b89 Use interface ILogItem 2021-11-15 17:29:08 +05:30
Bruno Windels bef12c7a8f prevent double free on olm account when logging out
by ensuring we only dispose the e2ee/Account once, as well as
the Session and other classes
2021-10-28 11:48:25 +02:00
Bruno Windels 67dd929951 put key session check in method 2021-10-26 11:14:46 +02:00
Bruno Windels ab2f15b5a2 prevent cache hiding better keys in storage (+ tests) 2021-10-25 19:17:13 +02:00
Bruno Windels 3c2604b384 test that sessions get free'd correctly 2021-10-25 17:33:33 +02:00
Bruno Windels 74e8bc3bda write unit tests 2021-10-25 17:19:48 +02:00
Bruno Windels 6bbce06d93 start writing tests for key loader 2021-10-22 19:01:20 +02:00
Bruno Windels 076f450ec7 this can be const 2021-10-22 18:01:26 +02:00
Bruno Windels b7e3a54e15 remove now usused code 2021-10-22 17:51:00 +02:00
Bruno Windels 1278288a42 cleanup RoomKey to changes and better naming 2021-10-22 17:50:30 +02:00
Bruno Windels ac23119838 convert SessionDecryption to TS and adapt to use KeyLoader 2021-10-22 17:48:35 +02:00
Bruno Windels b55930f084 convert ReplayDetectionEntry to typescript 2021-10-22 17:47:29 +02:00
Bruno Windels d6e243321b convert megolm/Decryption to typescript and adapt to KeyLoader 2021-10-22 17:46:39 +02:00
Bruno Windels 2ddb3fbf72 cleanup 2021-10-22 17:45:55 +02:00
Bruno Windels 77d10c93d6 convert groupby and megolm decryption utils to typescript 2021-10-21 14:40:51 +02:00
Bruno Windels 66a77519d7 implement key caching in KeyLoader
merging session cache into it so we can better manage and recycle
keys without exposing too low-level public methods on BaseLRUCache.

Using refCount instead of inUse flag as a key can of course be used
by multiple useKey calls at the same time.
2021-10-21 11:12:54 +02:00
Bruno Windels 3bafc89855 remove unused draft code 2021-10-20 15:25:11 +02:00
Bruno Windels 4fa285e85a convert LRUCache to ts 2021-10-20 15:24:58 +02:00
Bruno Windels 041cedbc58 fix typescript extension change 2021-10-20 15:24:39 +02:00