frontend->loadTicketsKey(key);
}
});
+ luaCtx.writeFunction("loadTicketsKey", [](const std::string& key) {
+ for (const auto& frontend : dnsdist::getFrontends()) {
+ if (!frontend) {
+ continue;
+ }
+ try {
+#ifdef HAVE_DNS_OVER_TLS
+ if (frontend->tlsFrontend) {
+ frontend->tlsFrontend->loadTicketsKey(key);
+ }
+#endif /* HAVE_DNS_OVER_TLS */
+#ifdef HAVE_DNS_OVER_HTTPS
+ if (frontend->dohFrontend) {
+ frontend->dohFrontend->loadTicketsKey(key);
+ }
+#endif /* HAVE_DNS_OVER_HTTPS */
+ }
+ catch (const std::exception& e) {
+ errlog("Error loading given tickets key for local %s", frontend->local.toStringWithPort());
+ }
+ }
+ });
+
luaCtx.registerFunction<void (std::shared_ptr<DOHFrontend>::*)(const LuaArray<std::shared_ptr<DOHResponseMapEntry>>&)>("setResponsesMap", [](const std::shared_ptr<DOHFrontend>& frontend, const LuaArray<std::shared_ptr<DOHResponseMapEntry>>& map) {
if (frontend != nullptr) {
:param str path: The directory to load configuration files from. Each file must end in ``.conf``.
+.. function:: loadTicketsKey(key)
+
+ Load the given TLS tickets key on all compatible frontends (DOH and TLS).
+
+ :param str key: The new raw TLS tickets key to use.
+
.. function:: reloadAllCertificates()
.. versionadded:: 1.4.0
:param str ticketsKeysFile: The path to a file from where TLS tickets keys should be loaded.
+ .. method:: DOHFrontend:loadTicketsKey(key)
+
+ Replace the current TLS tickets key with a given one.
+
+ :param str key: the new raw TLS tickets key to load.
+
.. method:: DOHFrontend:reloadCertificates()
Reload the current TLS certificate and key pairs.
:param str ticketsKeysFile: The path to a file from where TLS tickets keys should be loaded.
+ .. method:: TLSFrontend:loadTicketsKey(key)
+
+ Replace the current TLS tickets key with a given one.
+
+ :param str key: the new raw TLS tickets key to load.
+
.. method:: TLSFrontend:reloadCertificates()
.. versionadded:: 1.6.0