:param str name: The name in the DNS tree for which the Trust Anchors should be removed.
-.. function:: addDS(name, dscontent)
-
- .. deprecated:: 4.2.0
- Please use :func:`addTA` instead
-
- Adds a DS record (Trust Anchor) to the configuration
-
- :param str name: The name in the DNS tree from where this Trust Anchor should be used
- :param str dsrecord: The DS Record content associated with ``name``
-
-.. function:: clearDS([name])
-
- .. deprecated:: 4.2.0
- Please use :func:`clearTA` instead
-
- Remove Trust Anchors for a name from the list of configured trust anchors. When ``name`` is
- not given, remove *all* trust anchors instead.
-
- :param str name: The name in the DNS tree for which the Trust Anchors should be removed.
-
.. function:: addNTA(name[, reason])
.. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-dnssec.negative_trustanchors`.
In this example, 'policy.rpz' denotes the name of the zone to query for.
-.. note:: In versions before 4.5.0, ``rpzPrimary`` is called ``rpzMaster``. For backwards compatibility, version 4.5.0 does support ``rpzMaster`` as a synonym for ``rpzPrimary``.
-
-
The action to be taken on a match is defined by the zone itself, but in some cases it might be interesting to be able to override it, and always apply the same action
regardless of the one specified in the RPZ zone. To load from file and override the default action with a custom CNAME to badserver.example.com., use for example:
lci.rpzs.emplace_back(params);
});
- Lua->writeFunction("rpzMaster", [&lci](const boost::variant<string, std::vector<std::pair<int, string>>>& primaries_, const string& zoneName, const boost::optional<rpzOptions_t>& options) {
- lci.d_slog->info(Logr::Warning, "'rpzMaster' is deprecated and will be removed in a future release, use 'rpzPrimary' instead");
- rpzPrimary(lci, primaries_, zoneName, options);
- });
Lua->writeFunction("rpzPrimary", [&lci](const boost::variant<string, std::vector<std::pair<int, string>>>& primaries_, const string& zoneName, const boost::optional<rpzOptions_t>& options) {
rpzPrimary(lci, primaries_, zoneName, options);
});
lci.dsAnchors.clear();
});
- /* Remove in 4.3 */
- Lua->writeFunction("addDS", [&lci](const std::string& who, const std::string& what) {
- lci.d_slog->info(Logr::Warning, "addDS is deprecated and will be removed in the future, switch to addTA");
- DNSName zone(who);
- auto ds = std::dynamic_pointer_cast<DSRecordContent>(DSRecordContent::make(what));
- lci.dsAnchors[zone].insert(*ds);
- });
-
- /* Remove in 4.3 */
- Lua->writeFunction("clearDS", [&lci](boost::optional<string> who) {
- lci.d_slog->info(Logr::Warning, "clearDS is deprecated and will be removed in the future, switch to clearTA");
- if (who)
- lci.dsAnchors.erase(DNSName(*who));
- else
- lci.dsAnchors.clear();
- });
-
Lua->writeFunction("addNTA", [&lci](const std::string& who, const boost::optional<std::string> why) {
if (why)
lci.negAnchors[DNSName(who)] = static_cast<string>(*why);