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