]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/resolve/resolved-dns-trust-anchor.h
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / resolve / resolved-dns-trust-anchor.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 Copyright 2015 Lennart Poettering
6 ***/
7
8 typedef struct DnsTrustAnchor DnsTrustAnchor;
9
10 #include "hashmap.h"
11 #include "resolved-dns-answer.h"
12 #include "resolved-dns-rr.h"
13
14 /* This contains a fixed database mapping domain names to DS or DNSKEY records. */
15
16 struct DnsTrustAnchor {
17 Hashmap *positive_by_key;
18 Set *negative_by_name;
19 Set *revoked_by_rr;
20 };
21
22 int dns_trust_anchor_load(DnsTrustAnchor *d);
23 void dns_trust_anchor_flush(DnsTrustAnchor *d);
24
25 int dns_trust_anchor_lookup_positive(DnsTrustAnchor *d, const DnsResourceKey* key, DnsAnswer **answer);
26 int dns_trust_anchor_lookup_negative(DnsTrustAnchor *d, const char *name);
27
28 int dns_trust_anchor_check_revoked(DnsTrustAnchor *d, DnsResourceRecord *dnskey, DnsAnswer *rrs);
29 int dns_trust_anchor_is_revoked(DnsTrustAnchor *d, DnsResourceRecord *rr);