* rfc: queue rotation
* update rfc
* messages for queue rotation
* allow multiple subscribed queues per connection in Agent/Client.hs
* refactor
* fix module name
* allow multiple queues in duplex connection type
* update commands
* add indices
* addConnectionRcvQueue
* switch connection to another queue (WIP)
* update schema/protocol
* switching queue works, but sending messages after the switch fails
* messages are delivered after rotation
* use connection-scoped queue ID
* rename queue records fields
* refactor using SMPQueue class/instances
* simplify queries
* QKEY: check queue is not secured, refactor
* update rfc
* mark queue as primary in QUSE
* queue rotation errors
* fix async ack
* fix async ACK to send OK
* correction
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* use SWCH command
* rename
* take into account only active queue subscription when determining connection result if at least one queue is active
* remove comment
* only enable notifications for connections with enableNtfs = True
* async test (WIP)
* async queue rotation test
* simplify combining results
* test with 2 servers
* fix unused subscribeConnection
* switch to cabal build
* increase build timeout
* increase delay in async test
* skip queue rotation tests
* build matrix
* step name
* use ubuntu-18.04 in build matrix
* enable rotation tests
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* support stopping and resuming agent (#385)
* export agentDbPath
* support fully closing and resuming agent
* whitespace
* clean up
* support message flags visible to SMP server to control notifications (and for any future extensions)
* simplify message flags encoding
* GET command
* groups agent protocol
* groups to chat protocol
* update groups doc / diagram
* group protocol commands
* update group protocol
* count messages for different group operations
* broadcast and introduction as components for group protocol
* list connections in the broadcast
* protocol commands overview - using polymorphic commands
* another version of group protocol based on "broadcast" and "introduction" concepts
* update number of messages needed to establish connection
* corrections to broadcast and introduction protocols
* corrections in groups protocol
* corrections
* sign and verify agent messages with key sent in HELLO (TODO: hardcoded block size - should use size from handshake; verify signature of HELLO message itself; possibly, different MSG status if signature was not verified (currently ignored) or failed to verify (currently fails with AGENT A_ENCRYPTION - alternatively, change it to AGENT A_SIGNATURE))
* remove hardcoded block size, make it 4096 bytes
* verify signature of HELLO message before it is added to RcvQueue
* refactor
* update doc
* rename functions
* transport encryption (WIP - using fixed key, parsing/serialization works, SMP tests fail)
* transport encryption
* transport encryption: separate keys to receive and to send, counter-based IVs
* docs: update transport encryption and handshake
* transport encryption handshake (TODO: validate key hash, welcome block, move keys to system environment)
* change KeyHash type to newtype of Digest SHA256
* transport encryption: validate public key hash
* send and receive welcome block with SMP version
* refactor: parsing SMPServer
* remove unused function
* verify that client version is compatible with server version (major version is not smaller)
* update (fix) SMP server tests
* clrify encryption schemes
* increase SMP ping delay
* include authTag and msg size in encrypted message header, pad messages to fixed size
* use newtype for Key and IV bytestrings
* rename CryptoError constructors
* refactor Word to Int conversion
* refactor padding, replace padding character
* rfc corrections, comment
* rename aesTagSize -> authTagSize
* failing test