]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/bind9/lib/dns/rdata/generic/nsec3_50.h
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / bind9 / lib / dns / rdata / generic / nsec3_50.h
1 /*
2  * Copyright (C) 2008, 2012  Internet Systems Consortium, Inc. ("ISC")
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14  * PERFORMANCE OF THIS SOFTWARE.
15  */
16
17
18 #ifndef GENERIC_NSEC3_50_H
19 #define GENERIC_NSEC3_50_H 1
20
21 /* $Id$ */
22
23 /*!
24  * \brief Per RFC 5155 */
25
26 #include <isc/iterated_hash.h>
27
28 typedef struct dns_rdata_nsec3 {
29         dns_rdatacommon_t       common;
30         isc_mem_t               *mctx;
31         dns_hash_t              hash;
32         unsigned char           flags;
33         dns_iterations_t        iterations;
34         unsigned char           salt_length;
35         unsigned char           next_length;
36         isc_uint16_t            len;
37         unsigned char           *salt;
38         unsigned char           *next;
39         unsigned char           *typebits;
40 } dns_rdata_nsec3_t;
41
42 /*
43  * The corresponding NSEC3 interval is OPTOUT indicating possible
44  * insecure delegations.
45  */
46 #define DNS_NSEC3FLAG_OPTOUT 0x01U
47
48 /*%
49  * Non-standard, NSEC3PARAM only.
50  *
51  * Create a corresponding NSEC3 chain.
52  * Once the NSEC3 chain is complete this flag will be removed to signal
53  * that there is a complete chain.
54  *
55  * This flag is automatically set when a NSEC3PARAM record is added to
56  * the zone via UPDATE.
57  *
58  * NSEC3PARAM records with this flag set are supposed to be ignored by
59  * RFC 5155 compliant nameservers.
60  */
61 #define DNS_NSEC3FLAG_CREATE 0x80U
62
63 /*%
64  * Non-standard, NSEC3PARAM only.
65  *
66  * The corresponding NSEC3 set is to be removed once the NSEC chain
67  * has been generated.
68  *
69  * This flag is automatically set when the last active NSEC3PARAM record
70  * is removed from the zone via UPDATE.
71  *
72  * NSEC3PARAM records with this flag set are supposed to be ignored by
73  * RFC 5155 compliant nameservers.
74  */
75 #define DNS_NSEC3FLAG_REMOVE 0x40U
76
77 /*%
78  * Non-standard, NSEC3PARAM only.
79  *
80  * Used to identify NSEC3PARAM records added in this UPDATE request.
81  */
82 #define DNS_NSEC3FLAG_UPDATE 0x20U
83
84 /*%
85  * Non-standard, NSEC3PARAM only.
86  *
87  * Prevent the creation of a NSEC chain before the last NSEC3 chain
88  * is removed.  This will normally only be set when the zone is
89  * transitioning from secure with NSEC3 chains to insecure.
90  */
91 #define DNS_NSEC3FLAG_NONSEC 0x10U
92
93 #endif /* GENERIC_NSEC3_50_H */