Enable encryption by default

This commit is contained in:
Povilas Kanapickas 2021-10-28 14:19:22 +03:00
parent fce7615e42
commit bfa8964305
5 changed files with 11 additions and 5 deletions

View File

@ -0,0 +1,2 @@
The `--enable-crypto` command line option has been made the default to reduce chances of accidental security mishaps when configuring Barrier from command line.
A new `--disable-crypto` command line option has been added to explicitly disable encryption.

View File

@ -516,8 +516,8 @@ void MainWindow::startBarrier()
#endif
if (m_AppConfig->getCryptoEnabled()) {
args << "--enable-crypto";
if (!m_AppConfig->getCryptoEnabled()) {
args << "--disable-crypto";
}
#if defined(Q_OS_WIN)

View File

@ -166,7 +166,8 @@ private:
" -l --log <file> write log messages to file.\n" \
" --no-tray disable the system tray icon.\n" \
" --enable-drag-drop enable file drag & drop.\n" \
" --enable-crypto enable the crypto (ssl) plugin.\n" \
" --enable-crypto enable the crypto (ssl) plugin (default, deprecated).\n" \
" --disable-crypto disable the crypto (ssl) plugin.\n" \
" --profile-dir <path> use named profile directory instead.\n" \
" --drop-dir <path> use named drop target directory instead.\n"

View File

@ -282,7 +282,10 @@ ArgParser::parseGenericArgs(int argc, const char* const* argv, int& i)
argsBase().m_dropTarget = argv[++i];
}
else if (isArg(i, argc, argv, NULL, "--enable-crypto")) {
argsBase().m_enableCrypto = true;
LOG((CLOG_INFO "--enable-crypto is used by default. The option is deprecated."));
}
else if (isArg(i, argc, argv, NULL, "--disable-crypto")) {
argsBase().m_enableCrypto = false;
}
else if (isArg(i, argc, argv, NULL, "--profile-dir", 1)) {
argsBase().m_profileDirectory = argv[++i];

View File

@ -42,7 +42,7 @@ m_enableDragDrop(false),
m_dropTarget(""),
m_shouldExit(false),
m_barrierAddress(),
m_enableCrypto(false),
m_enableCrypto(true),
m_profileDirectory(""),
m_pluginDirectory("")
{