]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/resolve/resolved-dns-trust-anchor.h
resolved: add missing error code check when initializing DNS-over-TLS
[thirdparty/systemd.git] / src / resolve / resolved-dns-trust-anchor.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
0d2cd476
LP
2#pragma once
3
0d2cd476
LP
4typedef struct DnsTrustAnchor DnsTrustAnchor;
5
6#include "hashmap.h"
7#include "resolved-dns-answer.h"
8#include "resolved-dns-rr.h"
9
10/* This contains a fixed database mapping domain names to DS or DNSKEY records. */
11
12struct DnsTrustAnchor {
8e54f5d9
LP
13 Hashmap *positive_by_key;
14 Set *negative_by_name;
c9c72065 15 Set *revoked_by_rr;
0d2cd476
LP
16};
17
18int dns_trust_anchor_load(DnsTrustAnchor *d);
19void dns_trust_anchor_flush(DnsTrustAnchor *d);
20
8e54f5d9
LP
21int dns_trust_anchor_lookup_positive(DnsTrustAnchor *d, const DnsResourceKey* key, DnsAnswer **answer);
22int dns_trust_anchor_lookup_negative(DnsTrustAnchor *d, const char *name);
0c857028 23
d424da2a 24int dns_trust_anchor_check_revoked(DnsTrustAnchor *d, DnsResourceRecord *dnskey, DnsAnswer *rrs);
c9c72065 25int dns_trust_anchor_is_revoked(DnsTrustAnchor *d, DnsResourceRecord *rr);