1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2015 Lennart Poettering
10 typedef struct DnsTrustAnchor DnsTrustAnchor
;
13 #include "resolved-dns-answer.h"
14 #include "resolved-dns-rr.h"
16 /* This contains a fixed database mapping domain names to DS or DNSKEY records. */
18 struct DnsTrustAnchor
{
19 Hashmap
*positive_by_key
;
20 Set
*negative_by_name
;
24 int dns_trust_anchor_load(DnsTrustAnchor
*d
);
25 void dns_trust_anchor_flush(DnsTrustAnchor
*d
);
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
);
30 int dns_trust_anchor_check_revoked(DnsTrustAnchor
*d
, DnsResourceRecord
*dnskey
, DnsAnswer
*rrs
);
31 int dns_trust_anchor_is_revoked(DnsTrustAnchor
*d
, DnsResourceRecord
*rr
);