mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-09-16 17:03:35 +00:00
Read server keys from files or create if absent (#79)
* move server keys to config * add server keys from files * create server keys if key files do not exist * validate loaded server key pair * refactor fromString functions * key files in /etc/opt/simplex
This commit is contained in:
@@ -60,7 +60,7 @@ runSMPServer cfg@ServerConfig {tcpPort} = do
|
||||
|
||||
runClient :: (MonadUnliftIO m, MonadReader Env m) => Handle -> m ()
|
||||
runClient h = do
|
||||
keyPair <- asks serverKeyPair
|
||||
keyPair <- asks $ serverKeyPair . config
|
||||
liftIO (runExceptT $ serverHandshake h keyPair) >>= \case
|
||||
Right th -> runClientTransport th
|
||||
Left _ -> pure ()
|
||||
|
||||
Reference in New Issue
Block a user