1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
4 typedef struct DnsTrustAnchor DnsTrustAnchor
;
7 #include "resolved-dns-answer.h"
8 #include "resolved-dns-rr.h"
10 /* This contains a fixed database mapping domain names to DS or DNSKEY records. */
12 struct DnsTrustAnchor
{
13 Hashmap
*positive_by_key
;
14 Set
*negative_by_name
;
18 int dns_trust_anchor_load(DnsTrustAnchor
*d
);
19 void dns_trust_anchor_flush(DnsTrustAnchor
*d
);
21 int dns_trust_anchor_lookup_positive(DnsTrustAnchor
*d
, const DnsResourceKey
* key
, DnsAnswer
**answer
);
22 int dns_trust_anchor_lookup_negative(DnsTrustAnchor
*d
, const char *name
);
24 int dns_trust_anchor_check_revoked(DnsTrustAnchor
*d
, DnsResourceRecord
*dnskey
, DnsAnswer
*rrs
);
25 int dns_trust_anchor_is_revoked(DnsTrustAnchor
*d
, DnsResourceRecord
*rr
);