1/*	$NetBSD: zone_p.h,v 1.7 2024/02/21 22:52:08 christos Exp $	*/
2
3/*
4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
5 *
6 * SPDX-License-Identifier: MPL-2.0
7 *
8 * This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
11 *
12 * See the COPYRIGHT file distributed with this work for additional
13 * information regarding copyright ownership.
14 */
15
16#pragma once
17
18#include <stdbool.h>
19
20/*! \file */
21
22/*%
23 *     Types and functions below not be used outside this module and its
24 *     associated unit tests.
25 */
26
27ISC_LANG_BEGINDECLS
28
29typedef struct {
30	dns_diff_t *diff;
31	bool offline;
32} dns__zonediff_t;
33
34isc_result_t
35dns__zone_findkeys(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
36		   isc_stdtime_t now, isc_mem_t *mctx, unsigned int maxkeys,
37		   dst_key_t **keys, unsigned int *nkeys);
38
39isc_result_t
40dns__zone_updatesigs(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *version,
41		     dst_key_t *zone_keys[], unsigned int nkeys,
42		     dns_zone_t *zone, isc_stdtime_t inception,
43		     isc_stdtime_t expire, isc_stdtime_t keyxpire,
44		     isc_stdtime_t now, bool check_ksk, bool keyset_kskonly,
45		     dns__zonediff_t *zonediff);
46
47isc_result_t
48dns__zone_lookup_nsec3param(dns_zone_t *zone, dns_rdata_nsec3param_t *lookup,
49			    dns_rdata_nsec3param_t *param,
50			    unsigned char saltbuf[255], bool resalt);
51
52ISC_LANG_ENDDECLS
53