* agent: send CON to user when the 1st party responds HELLO; fix REPLY vulnerability
* test for getRcvConn
* add commented OK response to JOIN command
* store: use Only newtype to select one field
* 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
* inventory of error handling problems and types
* Change SMP protocol errors syntax
* connection errors in agent protocol (ERR CONN), STORE error -> AGENT error
* include exception in SEInternal error
* add MESSAGE errors, remove CRYPTO and SIZE errors
* agent protocol SYNTAX and AGENT errors
* BROKER errors
* group all client command (and agent response) errors
* BROKER TRANSPORT error
* simplify Client
* clean up
* transport errors
* simplify client
* parse / serialize agent errors
* differentiate crypto errors
* update errors.md
* make agent and SMP protocol errors consistent, simplify
* update doc
* test: parse / serialize protocol errors with QuickCheck
* add String to internal error
* exponential back-off when retrying to send HELLO
* refactor Client.hs
* replace fold with recursion in startTCPClient
* fail test if server did not start, refactor
* test: wait till TCP server stops
* test: refactor waiting for server to stop
* test: fail with error if server did not start/stop
* use separate db connections for each TCP client connection
* refactor atomically, increast delay in tests
* increase test delay for SMP server to start
* increase SMP ping frequency
* remove comment
* separate SQLite connection per thread, to support multi-threaded mode
* remove redundant import
* framework to parse and process agent messages
* update SMPClient functions to accept private key
* process messages (WIP)
* agent: create reply queue and send REPLY message with qInfo
* refactor agent commands
* refactor processSMPTransmission
* agent: logic to process REPLY message
* tests: check file doesn't exist in store tests after
* Revert "tests: check file doesn't exist in store tests after"
This reverts commit de624433a9.
* [WIP] tests: randomize db file
* [WIP] tests: try runIO to get filename into after
* random db file name for agent tests
* tests: randomize DB file name
* tests: increase SMP agent start delay
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>