Efim Poberezkin
0c866105d2
chain of two certificates - offline (identity) and online; switch certificates to v3 ( #238 )
2021-12-23 21:20:41 +04:00
Efim Poberezkin
e2cd370513
certificate validation on client side; check stored fingerprint on server start-up; non-optional fingerprint parsing ( #234 , closes #155 )
...
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2021-12-22 23:24:58 +04:00
Evgeny Poberezkin
400e057dab
use tls-unique as session ID, switch to TLS 1.2 in tls package fork ( #230 )
...
* use tls-unique as session ID, switch to TLS 1.2 in tls package fork
* Update src/Simplex/Messaging/Transport.hs
* Update src/Simplex/Messaging/Transport/WebSockets.hs
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-12-19 15:10:37 +00:00
Efim Poberezkin
129246c9e6
unencrypted SMP transport over TLS; simplified handshake ( #229 )
...
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2021-12-19 13:04:44 +04:00
Evgeny Poberezkin
e0acb42a28
Merge branch 'stable'
2021-12-17 15:44:58 +00:00
Evgeny Poberezkin
6b5cc3d2d5
0.5.1
2021-12-17 12:33:01 +00:00
Evgeny Poberezkin
5f7fe8b0dc
remove client from servers subscribers map after client disconnection ( #228 )
...
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-12-17 16:28:48 +04:00
Evgeny Poberezkin
1df146c702
make WebSockets use TLS Context ( #227 )
2021-12-16 07:30:16 +00:00
Evgeny Poberezkin
323fb1f03c
remove SMP server signing responses ( #226 )
...
* remove SMP server signing responses
* keep only one session ID
2021-12-16 07:15:45 +00:00
Efim Poberezkin
de01692ffd
enable WebSockets over TLS ( #225 )
2021-12-15 22:58:47 +04:00
Efim Poberezkin
bcf5e25cab
create TLS ServerParams once per server run; remove tlsServerParams from agent env (fixes functional agent client for chat) ( #223 )
2021-12-15 19:03:34 +04:00
Evgeny Poberezkin
5aa0e97cd9
sign server responses
2021-12-15 11:52:09 +00:00
Evgeny Poberezkin
cf3d0dfdc3
Transaction fields for size, session IDs, refactor ( #222 )
...
* add SMP session IDs/tls-unique to transmission
* refactor SMP transmissions: precise transmission types in server & client
* use correct session IDs
* remove TSession
2021-12-15 08:06:34 +00:00
Evgeny Poberezkin
83d352cfbe
TLS 1.3 transport ( #203 )
...
* TLS as Transport class instance with pre-defined server certificate/key
* refactor error logging
* remove Ed25519
* refactor TLS.cGet
* TLS over TCP for Transport
* Plain -> TLS
* comment
* getLn, change supported cipher
* use non fixed certificates
* comment
* check options earlier
* wording
* headers
* Update apps/smp-server/Main.hs
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
* Update apps/smp-server/Main.hs
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
* localhost -> server
* Update apps/smp-server/Main.hs
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
* remove comment
* agent key and cert fixtures WIP
* certificate and key in correct order
* exitFailure
* refactor loadServerCertificate
* remove liftIO
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-12-15 07:48:57 +00:00
Evgeny Poberezkin
a3101edbb9
Update src/Simplex/Messaging/Agent/Client.hs
...
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-12-13 12:04:52 +00:00
Evgeny Poberezkin
95fbd70346
encrypt recipient message bodies with crypto_box
2021-12-13 10:56:26 +00:00
Evgeny Poberezkin
acf5c15a05
increase SMP queue ID and message ID size to 24 bytes
2021-12-12 23:17:21 +00:00
Evgeny Poberezkin
560d9ceb71
add NaCl crypto_box scheme
2021-12-12 22:59:11 +00:00
Evgeny Poberezkin
bfa05c9432
all tests pass!
2021-12-12 21:17:25 +00:00
Evgeny Poberezkin
c45454d9e5
update server store log to save/restore additional keys, use Ed keys in tests instead of RSA
2021-12-12 20:51:34 +00:00
Evgeny Poberezkin
f6991539a2
add server signature keys and DH keys for server->recipient msg bodis to SMP commands (server store log and agent tests are skipped)
2021-12-12 12:22:44 +00:00
Evgeny Poberezkin
f640e71f82
remove BlockArguments extension ( #220 )
2021-12-10 12:21:54 +00:00
Evgeny Poberezkin
52eef2d7c7
Merge branch 'master' into v5
2021-12-10 11:52:08 +00:00
Evgeny Poberezkin
ff2b975cd8
prepare v0.5.0 - update versions, changelog ( #219 )
...
* prepare v0.5.0 - update versions, changelog
* Update CHANGELOG.md
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-12-08 15:02:28 +00:00
Evgeny Poberezkin
fe2d6607de
delete contact connection with DEL command ( #218 )
2021-12-07 19:05:19 +00:00
Evgeny Poberezkin
218a7756f8
RJCT / rejectContact to reject contact requests ( #214 )
2021-12-06 13:12:10 +00:00
Evgeny Poberezkin
82ae5c623f
Merge branch 'master' into v5
2021-12-06 09:22:45 +00:00
Evgeny Poberezkin
57c9ccfc08
use base64url encoding for public key in connection requests; only allow accepting invitations that were not accepted ( #213 )
...
* use base64url encoding for public key in connection requests; only allow accepting invitations that were not accepted
* subscribe ContactConnection, fix test to use base64url encoding in key example
2021-12-06 09:05:13 +00:00
Evgeny Poberezkin
58758e0572
Merge branch 'master' into v5
2021-12-04 21:08:38 +00:00
Evgeny Poberezkin
3e226fc3f2
add CONF/LET for invitations, use REQ/ACPT only with contact connections ( #212 )
2021-12-04 21:08:02 +00:00
Evgeny Poberezkin
b116408ec3
Merge branch 'master' into v5
2021-12-04 18:55:23 +00:00
Evgeny Poberezkin
04c65d98da
support permanent connection link ("contact") in SMP agent protocols ( #143 )
...
* open/public queue extension for SMP and SMP agent protocols
* add connection mode - invitation or contact
* use ConnectionMode with REQ and ACPT agent notification/command
* parameterize ConnectionRequest with ConnectionMode
* implement Contact connection mode for permanent connection links
* tests for contact connections
2021-12-04 18:42:08 +00:00
Evgeny Poberezkin
6126e72d4f
Merge branch 'master' into v5
2021-12-02 18:06:42 +00:00
Evgeny Poberezkin
606bbf5062
URI syntax for SMP queues and connection requests ( #210 )
...
* URI syntax for SMP queues and connection requests
* fix connection request parsing/serializing
* add ConnectionRequest sqlite instances
2021-12-02 17:43:05 +00:00
Evgeny Poberezkin
e1002d5ac0
GADTs for cryptographic keys ( #208 )
...
* GADTs for cryptographic keys
* update tests (signature timing tests still fail)
* fix signature verification timing tests
* configurable algorithm to sign commands to SMP queues (Ed448 by default)
* add dummy Ed keys, add timing tests for Ed keys
* re-enable Connection subscriptions tests
2021-11-28 11:44:22 +00:00
Evgeny Poberezkin
99b3749890
simplify RSA private key types ( #207 )
...
* simplify RSA private key types
* remove updateSignKey method
2021-11-28 07:08:47 +00:00
Evgeny Poberezkin
eb941f7435
simplify pending message delivery ( #202 )
...
* simplify pending message delivery (WIP)
* refactor
2021-11-19 16:26:51 +00:00
Evgeny Poberezkin
227d83d0e7
SMP commands for notifications (NKEY/NID and NSUB/NMSG) with separate queue ID and key ( #199 )
...
* SMP commands for notifications (LSTN, NTFY) with separate queue IDs and keys
* rename Notifier types
* remove notify key and id from NEW and IDS commands (TODO add other commands)
* fix StoreLog serialization
* add commands for managing notifications
* add notification subscribers to server state, add notifier ID and key to store log
* add notifier ID and key to the queue
* refactor END notification to work for both types of subscriptions, deliver message notification (NMSG)
* process NSUB command - subscribe to message notifications
* test for message notifications
* fix SMP client function for NSUB command
* fix parse/serialize NID command
* refactor use ifM
* check duplicate notifier ID only against other notifier IDs
* refactor getQueue
* test notifier ID and key with store log
* Update src/Simplex/Messaging/Client.hs
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
* Update src/Simplex/Messaging/Server.hs
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
* store log: s/NOTIFY/NOTIFIER/
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-11-14 18:52:29 +00:00
Evgeny Poberezkin
057d5eeb24
AES encription with auth tag after cypher text (the order in WebCrypto etc.); upgrade GHC to 8.10.7 ( #197 )
2021-10-24 21:03:41 +01:00
Evgeny Poberezkin
33de5f6fec
include migrations in the package, update docs, versions ( #194 )
...
* include migrations in the package, update versions
* update DigitalOcean version
2021-09-11 18:36:12 +01:00
Evgeny Poberezkin
0f9226ba2a
update version (0.4.0) and changelog ( #193 )
...
* update version (0.4.0) and changelog
* changelog corrections
* make tests more stable
2021-09-11 10:26:51 +01:00
Efim Poberezkin
862f25500d
v4 ( #192 )
2021-09-09 01:30:39 +10:00
Evgeny Poberezkin
e07bedac0e
move tryError to Simplex.Messaging.Util ( #191 )
2021-09-04 19:01:54 +01:00
Evgeny Poberezkin
2ac903a2dd
do not allow "," and ";" separators in smp-server hostname ( #189 )
2021-09-03 20:35:48 +01:00
Evgeny Poberezkin
d23254f44a
SMP block size via config, the client can override size set by the server ( #188 )
2021-09-03 20:16:10 +01:00
Evgeny Poberezkin
9a3afda290
ACK command, ackMessage, do not send ACK to SMP server on MSG (after the initial handshake) ( #187 )
2021-09-01 08:29:12 +01:00
Evgeny Poberezkin
68f24f90d1
export withAgentLock and do not acquire agent lock in functional API ( #186 )
2021-08-30 18:29:13 +01:00
Evgeny Poberezkin
75259d70cf
set block size to 4096 bytes ( #185 )
2021-08-30 10:47:22 +01:00
Evgeny Poberezkin
96c6339306
fix error handling of sending pending messages; set block size to 8192 ( #184 )
...
* fix error handling of sending pending messages
* s/tryAction/tryError/
2021-08-29 13:10:59 +01:00
Evgeny Poberezkin
7b5ebf7bd2
change type of agent sendMessage result to AgentMsgId ( #183 )
2021-08-26 23:25:49 +01:00