* use TCP keep-alive instead of SMP protocol PING
* update header files
* use CInt
* use Int again
* use network-3.1.2.7
* use https in cabal.project
* confitional keep-alive parameters to work on mac
* pass keep-alive opts via client/agent options
* remove space
* make sending confirmation asynchronous
* confirm first queue synchronously (on JOIN, and delete connection on failure), second queue asynchronously (from REPLY msg)
* test to retry JOIN when the first attempt fails
* process confirmation delivery errors
* make new smp client attempt to reconnect on network error
* reconnect async wip
* remove comments
* trigger tryReconnectClient
* add subscription before trying to take smp client
* move atomically modify asyncClients
* remove logs
* corrections
* don't put error into new smp client TMVar
* UnliftIO async
* re-work
* test for connection to the server that was initially down
* fix tests
* additionally test that bob receives the message after re-connect
* make test independent of event order
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* separate skipped messages from ratchet
* return diff for skipped messages instead of the whole state (tests fail)
* fix ratchet tests
* JSON encoding/decoding for ratchet state
* schema for ratchets
* split MonadUnliftIO instance for ExceptT to a separate file
* update StrEncoding instance for Str
* ratchet store methods
* updateRatchet store method
* move E2E ratchet params to Ratchet module
* x3dh key agreement for double ratchet
* test/fix x3dh, use x3dh for ratchets initialization
* store/get x3dh keys, save ratchet of fixed X448 type
* double-ratchet encryption integration (tests fail)
* fix double ratchet
* fix padding and message length
* remove unused code for "activations"
* remove comment
* add version checks for forward/backward compatibility
* split loading ratchet and skipped message keys
* remove unused encoding instances for Algorithm types
* update ratchet initialization params
* test: HELLO blocking message delivery on the same server
* test: quota exceeded in one queue should not block delivery in other queues
* fix test to work in stable branch
* simplify pending message delivery (#202)
* simplify pending message delivery (WIP)
* refactor
* fix concurrent message delivery
* remove type synonym
* types and encodings for double ratchet integration
* upgrade stack resolver
* type classes for version agreement, encode/decode connection request links and E2E params with versioning
* encode/decode client parameters (version and DH key) in SMP queue URI using query string parameters
* restore support of the current SMP queue URI format
* update AMessage to only send queues in REPLY message (not the full connection request)
* new agent message evnvelopes (tests fail)
* new message envelopes - tests pass
* store fully encrypted messages before sending
* unify message delivery via DB queue (excluding confirmation and invitation)
* remove activateSecuredQueue
* linter hints
* remove comment
* export order
* save rachet-encrypted message, not per-queue encrypted
* delete message after it is accepted by the server, reduce message delivery interval for the tests
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* make KeyHash non-optional, StrEncoding class
* change server URI format in agent config, refactor with StrEncoding
* refactor Crypto using checkAlgorithm
* refactor parsing connection requests
* prepare to validate CA fingerprint sent in client handshake
* KeyHash check in handshake
* rename type to CliCommand
* server validates keyhash sent by the client
* validate -a option when parsing
* more of StrEncoding
* binary SMP protocol encoding (server tests fail)
* use 1 byte for bytestring length when encoding/decoding
* Encoding class, binary tags
* update server tests
* negotiate SMP version in client/server handshake
* add version columns to queues and connections
* split parsing SMP client commands and server responses to different functions
* check uniqueness of protocol tags
* split client commands and server responses/messages to separate types
* update types in SMP client
* remove pattern synonyms for SMP errors
* simplify getHandshake
* update SMP protocol encoding in protocol spec
* encode time as a number of seconds (64-bit integer) since epoch