aboutsummaryrefslogtreecommitdiff
path: root/zenserver/config.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-02-03 13:46:38 +0100
committerPer Larsson <[email protected]>2022-02-03 13:46:38 +0100
commit5ff0326dd14100df799bdbba79819637abaf8ae5 (patch)
treea71967651d4a19659c9e113425eb6e6ad11dd7b5 /zenserver/config.cpp
parentAdded AES encryption key/IV cli options. (diff)
downloadzen-5ff0326dd14100df799bdbba79819637abaf8ae5.tar.xz
zen-5ff0326dd14100df799bdbba79819637abaf8ae5.zip
Added encryption key/IV option in LUA.
Diffstat (limited to 'zenserver/config.cpp')
-rw-r--r--zenserver/config.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp
index 4c30be3ea..14908b615 100644
--- a/zenserver/config.cpp
+++ b/zenserver/config.cpp
@@ -573,5 +573,11 @@ ParseConfigFile(const std::filesystem::path& Path, ZenServerOptions& ServerOptio
ServerOptions.GcConfig.Cas.TinyStrategySizeLimit = CasGcConfig.value().get_or("tinystrategysizelimit", ~uint64_t(0));
}
}
+
+ if (sol::optional<sol::table> SecurityConfig = lua["security"])
+ {
+ ServerOptions.EncryptionKey = SecurityConfig.value().get_or("encryptionaeskey", std::string());
+ ServerOptions.EncryptionIV = SecurityConfig.value().get_or("encryptionaesiv", std::string());
+ }
}
}