summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-trust-anchor.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-02 22:12:13 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-03 12:59:26 +0100
commit8e54f5d90a6b9dd1ff672fb97ea98de66c49e332 (patch)
tree62f9c69d04c8925d7ff78aabf9755482c3e24ee7 /src/resolve/resolved-dns-trust-anchor.h
parente48b9a6490222f59201615a1be25c0a46d7d79b5 (diff)
resolved: add negative trust anchro support, and add trust anchor configuration files
This adds negative trust anchor support and allows reading trust anchor data from disk, from files /etc/systemd/dnssec-trust-anchors.d/*.positive and /etc/systemd/dnssec-trust-anchros.d/*.negative, as well as the matching counterparts in /usr/lib and /run. The positive trust anchor files are more or less compatible to normal DNS zone files containing DNSKEY and DS RRs. The negative trust anchor files contain only new-line separated hostnames for which to require no signing. By default no trust anchor files are installed, in which case the compiled-in root domain DS RR is used, as before. As soon as at least one positive root anchor for the root is defined via trust anchor files this buil-in DS RR is not added though.
Diffstat (limited to 'src/resolve/resolved-dns-trust-anchor.h')
-rw-r--r--src/resolve/resolved-dns-trust-anchor.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-trust-anchor.h b/src/resolve/resolved-dns-trust-anchor.h
index 06f3723914..1140cde041 100644
--- a/src/resolve/resolved-dns-trust-anchor.h
+++ b/src/resolve/resolved-dns-trust-anchor.h
@@ -30,10 +30,12 @@ typedef struct DnsTrustAnchor DnsTrustAnchor;
/* This contains a fixed database mapping domain names to DS or DNSKEY records. */
struct DnsTrustAnchor {
- Hashmap *by_key;
+ Hashmap *positive_by_key;
+ Set *negative_by_name;
};
int dns_trust_anchor_load(DnsTrustAnchor *d);
void dns_trust_anchor_flush(DnsTrustAnchor *d);
-int dns_trust_anchor_lookup(DnsTrustAnchor *d, DnsResourceKey* key, DnsAnswer **answer);
+int dns_trust_anchor_lookup_positive(DnsTrustAnchor *d, const DnsResourceKey* key, DnsAnswer **answer);
+int dns_trust_anchor_lookup_negative(DnsTrustAnchor *d, const char *name);