mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
use SQLCipher (#981)
* use SQLCipher * pass encryption key via CLI options * update dependencies to use git * add CONTRIBUTING.md * move flag, enable build in sqlcipher branch * update dependencies
This commit is contained in:
committed by
GitHub
parent
b4d7afb4c1
commit
02ca7234fb
@@ -25,6 +25,7 @@ import System.FilePath (combine)
|
||||
|
||||
data ChatOpts = ChatOpts
|
||||
{ dbFilePrefix :: String,
|
||||
dbKey :: String,
|
||||
smpServers :: [SMPServer],
|
||||
networkConfig :: NetworkConfig,
|
||||
logConnections :: Bool,
|
||||
@@ -47,6 +48,14 @@ chatOpts appDir defaultDbFileName = do
|
||||
<> value defaultDbFilePath
|
||||
<> showDefault
|
||||
)
|
||||
dbKey <-
|
||||
strOption
|
||||
( long "key"
|
||||
<> short 'k'
|
||||
<> metavar "KEY"
|
||||
<> help "Database encryption key/pass-phrase"
|
||||
<> value ""
|
||||
)
|
||||
smpServers <-
|
||||
option
|
||||
parseSMPServers
|
||||
@@ -126,6 +135,7 @@ chatOpts appDir defaultDbFileName = do
|
||||
pure
|
||||
ChatOpts
|
||||
{ dbFilePrefix,
|
||||
dbKey,
|
||||
smpServers,
|
||||
networkConfig = fullNetworkConfig socksProxy $ useTcpTimeout socksProxy t,
|
||||
logConnections,
|
||||
|
||||
Reference in New Issue
Block a user