* Fetch capabilities in the background
& keep them up to date
* Add missed await
* Replace some more runAllTimers
and round down the wait time for sanity
* Remove double comment
* Typo
* Add a method back that will fetch capabilities if they're not already there
* Add tests
* Catch exception here too
* Add test for room version code
* Use server name instead of homeserver url to allow well-known lookups during QR OIDC reciprocation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Make MSC3906 implementation compatible with Rust Crypto
* Verify using CryptoApi but no cross-signing (yet)
* Use new crossSignDevice() function
* Mock crossSignDevice() function
* Fix type of parameter in mock
* review: cleaning
* review: Remove unneeded defensive coding
* review: fix outdated documentation
* QR login: review, cleaning
* QR login | review: use getSafeUserId
---------
Co-authored-by: Valere <bill.carson@valrsoft.com>
We had two identical sets of base64 functions in the js-sdk, both
using Buffer which isn't really available in the browser unless you're
using an old webpack (ie. what element-web uses). This PR:
* Takes the crypto base64 file and moves it out of crypto (because
we use base64 for much more than just crypto)
* Makes them work in a browser without the Buffer global
* Removes the other base64 functions
* Changes everything to use the new common ones
* Adds a comment explaining why the function is kinda ugly and how
soul destroyingly awful the JS ecosystem is.
* Runs the tests with both impls
* Changes the test to not just test the decoder against the encoder
* Adds explicit support & tests for (decoding) base64Url (I'll add an
encode method later, no need for that to go in this PR too).
* v2 of MSC3903 implementation
This is a deliberate breaking change on an unstable feature.
* Reinstate v1 support to make this a non-breaking change
Deprecates several experimental types
* Remove MSC3903 v1 support
This is a breaking change in code marked unstable/experimental
Revert "Reinstate v1 support to make this a non-breaking change"
This reverts commit 89773458b9.
* v2 of MSC3903 implementation
This is a deliberate breaking change on an unstable feature.
* Test correct protocol version
* Fix up test
* v2 of MSC3903 implementation
This is a deliberate breaking change on an unstable feature.
* Test correct protocol version
* Fix up test
* Reinstate v1 support to make this a non-breaking change
Deprecates several experimental types
* Clean implementation of MSC3886 and MSC3903
* Refactor to use object initialiser instead of lots of args + handle non-compliant fetch better
* Start of some unit tests
* Make AES work on Node.js as well as browser
* Tests for ECDH/X25519
* stric mode linting
* Fix incorrect test
* Refactor full rendezvous logic out of react-sdk into js-sdk
* Use correct unstable import
* Pass fetch around
* Make correct usage of fetch in tests
* fix: you can't call fetch when it's not on window
* Use class names to make it clearer that these are unstable MSC implementations
* Linting
* Clean implementation of MSC3886 and MSC3903
* Refactor to use object initialiser instead of lots of args + handle non-compliant fetch better
* Start of some unit tests
* Make AES work on Node.js as well as browser
* Tests for ECDH/X25519
* stric mode linting
* Fix incorrect test
* Refactor full rendezvous logic out of react-sdk into js-sdk
* Use correct unstable import
* Pass fetch around
* Make correct usage of fetch in tests
* fix: you can't call fetch when it's not on window
* Use class names to make it clearer that these are unstable MSC implementations
* Linting
* Reduce log noise
* Tidy up interface a bit
* Additional test for transport layer
* Linting
* Refactor dummy transport to be re-usable
* Remove redundant condition
* Handle more error cases
* Initial tests for MSC3906
* Reduce scope of PR to only cover generating a code on existing device
* Strict linting
* Additional test cases
* Lint
* additional test cases and remove some code smells
* More test cases
* Strict lint
* Strict lint
* Test case
* Refactor to handle UIA
* Unstable prefixes
* Lint
* Missed due to lack of strict...
* Test server capabilities using Feature
* Remove redundant assignment
* Refactor ro resuse generateDecimal from SAS
* Update src/rendezvous/transports/simpleHttpTransport.ts
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/rendezvous/transports/simpleHttpTransport.ts
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/rendezvous/channels/ecdhV1.ts
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/rendezvous/transports/simpleHttpTransport.ts
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Rename files to titlecase
* Visibility modifiers
* Resolve public mutability
* Refactor logic to reduce duplication
* Refactor to have better defined data types throughout
* Rebase and remove Node.js crypto
* Wipe AES key out after use
* Add typing for MSC3906 layer
* Strict lint
* Fix double connect detection
* Remove unintended debug statement
* Return types
* Use generics
* Make type of MSC3903ECDHPayload explicit
* Use unstable prefix for RendezvousChannelAlgorithm
* Fix
* Extra unstable type
* Test types
Co-authored-by: Travis Ralston <travisr@matrix.org>
Co-authored-by: Kerry <kerrya@element.io>