]>
| Commit | Line | Data |
|---|---|---|
| db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 0d2cd476 LP |
2 | #pragma once |
| 3 | ||
| 284d7641 | 4 | #include "resolved-forward.h" |
| 0d2cd476 LP |
5 | |
| 6 | /* This contains a fixed database mapping domain names to DS or DNSKEY records. */ | |
| 7 | ||
| 68527d30 | 8 | typedef struct DnsTrustAnchor { |
| 8e54f5d9 LP |
9 | Hashmap *positive_by_key; |
| 10 | Set *negative_by_name; | |
| c9c72065 | 11 | Set *revoked_by_rr; |
| 68527d30 | 12 | } DnsTrustAnchor; |
| 0d2cd476 LP |
13 | |
| 14 | int dns_trust_anchor_load(DnsTrustAnchor *d); | |
| 15 | void dns_trust_anchor_flush(DnsTrustAnchor *d); | |
| 16 | ||
| 8e54f5d9 LP |
17 | int dns_trust_anchor_lookup_positive(DnsTrustAnchor *d, const DnsResourceKey* key, DnsAnswer **answer); |
| 18 | int dns_trust_anchor_lookup_negative(DnsTrustAnchor *d, const char *name); | |
| 0c857028 | 19 | |
| d424da2a | 20 | int dns_trust_anchor_check_revoked(DnsTrustAnchor *d, DnsResourceRecord *dnskey, DnsAnswer *rrs); |
| c9c72065 | 21 | int dns_trust_anchor_is_revoked(DnsTrustAnchor *d, DnsResourceRecord *rr); |