~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to lib/dns/include/dns/keytable.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
 
2
 * Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
3
3
 * Copyright (C) 2000, 2001  Internet Software Consortium.
4
4
 *
5
 
 * Permission to use, copy, modify, and distribute this software for any
 
5
 * Permission to use, copy, modify, and/or distribute this software for any
6
6
 * purpose with or without fee is hereby granted, provided that the above
7
7
 * copyright notice and this permission notice appear in all copies.
8
8
 *
15
15
 * PERFORMANCE OF THIS SOFTWARE.
16
16
 */
17
17
 
18
 
/* $Id: keytable.h,v 1.10.206.1 2004/03/06 08:13:56 marka Exp $ */
 
18
/* $Id: keytable.h,v 1.16 2007/06/19 23:47:16 tbox Exp $ */
19
19
 
20
20
#ifndef DNS_KEYTABLE_H
21
21
#define DNS_KEYTABLE_H 1
24
24
 ***** Module Info
25
25
 *****/
26
26
 
27
 
/*
28
 
 * Key Tables
29
 
 *
 
27
/*! \file
 
28
 * \brief
30
29
 * The keytable module provides services for storing and retrieving DNSSEC
31
30
 * trusted keys, as well as the ability to find the deepest matching key
32
31
 * for a given domain name.
33
32
 *
34
33
 * MP:
35
 
 *      The module ensures appropriate synchronization of data structures it
 
34
 *\li   The module ensures appropriate synchronization of data structures it
36
35
 *      creates and manipulates.
37
36
 *
38
37
 * Resources:
39
 
 *      <TBS>
 
38
 *\li   TBS
40
39
 *
41
40
 * Security:
42
 
 *      No anticipated impact.
 
41
 *\li   No anticipated impact.
43
42
 */
44
43
 
45
44
#include <isc/lang.h>
52
51
 
53
52
isc_result_t
54
53
dns_keytable_create(isc_mem_t *mctx, dns_keytable_t **keytablep);
55
 
/*
 
54
/*%<
56
55
 * Create a keytable.
57
56
 *
58
57
 * Requires:
59
58
 *
60
 
 *      'mctx' is a valid memory context.
 
59
 *\li   'mctx' is a valid memory context.
61
60
 *
62
 
 *      keytablep != NULL && *keytablep == NULL
 
61
 *\li   keytablep != NULL && *keytablep == NULL
63
62
 *
64
63
 * Ensures:
65
64
 *
66
 
 *      On success, *keytablep is a valid, empty key table.
 
65
 *\li   On success, *keytablep is a valid, empty key table.
67
66
 *
68
67
 * Returns:
69
68
 *
70
 
 *      ISC_R_SUCCESS
 
69
 *\li   ISC_R_SUCCESS
71
70
 *
72
 
 *      Any other result indicates failure.
 
71
 *\li   Any other result indicates failure.
73
72
 */
74
73
 
75
74
 
76
75
void
77
76
dns_keytable_attach(dns_keytable_t *source, dns_keytable_t **targetp);
78
 
/*
 
77
/*%<
79
78
 * Attach *targetp to source.
80
79
 *
81
80
 * Requires:
82
81
 *
83
 
 *      'source' is a valid keytable.
 
82
 *\li   'source' is a valid keytable.
84
83
 *
85
 
 *      'targetp' points to a NULL dns_keytable_t *.
 
84
 *\li   'targetp' points to a NULL dns_keytable_t *.
86
85
 *
87
86
 * Ensures:
88
87
 *
89
 
 *      *targetp is attached to source.
 
88
 *\li   *targetp is attached to source.
90
89
 */
91
90
 
92
91
void
93
92
dns_keytable_detach(dns_keytable_t **keytablep);
94
 
/*
 
93
/*%<
95
94
 * Detach *keytablep from its keytable.
96
95
 *
97
96
 * Requires:
98
97
 *
99
 
 *      'keytablep' points to a valid keytable.
 
98
 *\li   'keytablep' points to a valid keytable.
100
99
 *
101
100
 * Ensures:
102
101
 *
103
 
 *      *keytablep is NULL.
104
 
 *
105
 
 *      If '*keytablep' is the last reference to the keytable,
106
 
 *
107
 
 *              All resources used by the keytable will be freed
 
102
 *\li   *keytablep is NULL.
 
103
 *
 
104
 *\li   If '*keytablep' is the last reference to the keytable,
 
105
 *              all resources used by the keytable will be freed
108
106
 */
109
107
 
110
108
isc_result_t
111
109
dns_keytable_add(dns_keytable_t *keytable, dst_key_t **keyp);
112
 
/*
 
110
/*%<
113
111
 * Add '*keyp' to 'keytable'.
114
112
 *
115
113
 * Notes:
116
114
 *
117
 
 *      Ownership of *keyp is transferred to the keytable.
 
115
 *\li   Ownership of *keyp is transferred to the keytable.
118
116
 *
119
117
 * Requires:
120
118
 *
121
 
 *      keyp != NULL && *keyp is a valid dst_key_t *.
 
119
 *\li   keyp != NULL && *keyp is a valid dst_key_t *.
122
120
 *
123
121
 * Ensures:
124
122
 *
125
 
 *      On success, *keyp == NULL
 
123
 *\li   On success, *keyp == NULL
126
124
 *
127
125
 * Returns:
128
126
 *
129
 
 *      ISC_R_SUCCESS
 
127
 *\li   ISC_R_SUCCESS
130
128
 *
131
 
 *      Any other result indicates failure.
 
129
 *\li   Any other result indicates failure.
132
130
 */
133
131
 
134
132
isc_result_t
135
133
dns_keytable_findkeynode(dns_keytable_t *keytable, dns_name_t *name,
136
134
                         dns_secalg_t algorithm, dns_keytag_t tag,
137
135
                         dns_keynode_t **keynodep);
138
 
/*
 
136
/*%<
139
137
 * Search for a key named 'name', matching 'algorithm' and 'tag' in
140
 
 * 'keytable'.
 
138
 * 'keytable'.  This finds the first instance which matches.  Use
 
139
 * dns_keytable_findnextkeynode() to find other instances.
141
140
 *
142
141
 * Requires:
143
142
 *
144
 
 *      'keytable' is a valid keytable.
145
 
 *
146
 
 *      'name' is a valid absolute name.
147
 
 *
148
 
 *      keynodep != NULL && *keynodep == NULL
 
143
 *\li   'keytable' is a valid keytable.
 
144
 *
 
145
 *\li   'name' is a valid absolute name.
 
146
 *
 
147
 *\li   keynodep != NULL && *keynodep == NULL
149
148
 *
150
149
 * Returns:
151
150
 *
152
 
 *      ISC_R_SUCCESS
153
 
 *      ISC_R_NOTFOUND
 
151
 *\li   ISC_R_SUCCESS
 
152
 *\li   DNS_R_PARTIALMATCH      the name existed in the keytable.
 
153
 *\li   ISC_R_NOTFOUND
154
154
 *
155
 
 *      Any other result indicates an error.
 
155
 *\li   Any other result indicates an error.
156
156
 */
157
157
 
158
158
isc_result_t
159
159
dns_keytable_findnextkeynode(dns_keytable_t *keytable, dns_keynode_t *keynode,
160
160
                                             dns_keynode_t **nextnodep);
161
 
/*
 
161
/*%<
162
162
 * Search for the next key with the same properties as 'keynode' in
163
 
 * 'keytable'.
 
163
 * 'keytable' as found by dns_keytable_findkeynode().
164
164
 *
165
165
 * Requires:
166
166
 *
167
 
 *      'keytable' is a valid keytable.
168
 
 *
169
 
 *      'keynode' is a valid keynode.
170
 
 *
171
 
 *      nextnodep != NULL && *nextnodep == NULL
 
167
 *\li   'keytable' is a valid keytable.
 
168
 *
 
169
 *\li   'keynode' is a valid keynode.
 
170
 *
 
171
 *\li   nextnodep != NULL && *nextnodep == NULL
172
172
 *
173
173
 * Returns:
174
174
 *
175
 
 *      ISC_R_SUCCESS
176
 
 *      ISC_R_NOTFOUND
 
175
 *\li   ISC_R_SUCCESS
 
176
 *\li   ISC_R_NOTFOUND
177
177
 *
178
 
 *      Any other result indicates an error.
 
178
 *\li   Any other result indicates an error.
179
179
 */
180
180
 
181
181
isc_result_t
182
182
dns_keytable_finddeepestmatch(dns_keytable_t *keytable, dns_name_t *name,
183
183
                              dns_name_t *foundname);
184
 
/*
 
184
/*%<
185
185
 * Search for the deepest match of 'name' in 'keytable'.
186
186
 *
187
187
 * Requires:
188
188
 *
189
 
 *      'keytable' is a valid keytable.
190
 
 *
191
 
 *      'name' is a valid absolute name.
192
 
 *
193
 
 *      'foundname' is a name with a dedicated buffer.
 
189
 *\li   'keytable' is a valid keytable.
 
190
 *
 
191
 *\li   'name' is a valid absolute name.
 
192
 *
 
193
 *\li   'foundname' is a name with a dedicated buffer.
194
194
 *
195
195
 * Returns:
196
196
 *
197
 
 *      ISC_R_SUCCESS
198
 
 *      ISC_R_NOTFOUND
 
197
 *\li   ISC_R_SUCCESS
 
198
 *\li   ISC_R_NOTFOUND
199
199
 *
200
 
 *      Any other result indicates an error.
 
200
 *\li   Any other result indicates an error.
201
201
 */
202
202
 
203
203
void
204
204
dns_keytable_detachkeynode(dns_keytable_t *keytable,
205
205
                           dns_keynode_t **keynodep);
206
 
/*
 
206
/*%<
207
207
 * Give back a keynode found via dns_keytable_findkeynode().
208
208
 *
209
209
 * Requires:
210
210
 *
211
 
 *      'keytable' is a valid keytable.
 
211
 *\li   'keytable' is a valid keytable.
212
212
 *
213
 
 *      *keynodep is a valid keynode returned by a call to
 
213
 *\li   *keynodep is a valid keynode returned by a call to
214
214
 *      dns_keytable_findkeynode().
215
215
 *
216
216
 * Ensures:
217
217
 *
218
 
 *      *keynodep == NULL
 
218
 *\li   *keynodep == NULL
219
219
 */
220
220
 
221
221
isc_result_t
222
222
dns_keytable_issecuredomain(dns_keytable_t *keytable, dns_name_t *name,
223
223
                            isc_boolean_t *wantdnssecp);
224
 
/*
 
224
/*%<
225
225
 * Is 'name' at or beneath a trusted key?
226
226
 *
227
227
 * Requires:
228
228
 *
229
 
 *      'keytable' is a valid keytable.
230
 
 *
231
 
 *      'name' is a valid absolute name.
232
 
 *
233
 
 *      '*wantsdnssecp' is a valid isc_boolean_t.
 
229
 *\li   'keytable' is a valid keytable.
 
230
 *
 
231
 *\li   'name' is a valid absolute name.
 
232
 *
 
233
 *\li   '*wantsdnssecp' is a valid isc_boolean_t.
234
234
 *
235
235
 * Ensures:
236
236
 *
237
 
 *      On success, *wantsdnssecp will be ISC_TRUE if and only if 'name'
 
237
 *\li   On success, *wantsdnssecp will be ISC_TRUE if and only if 'name'
238
238
 *      is at or beneath a trusted key.
239
239
 *
240
240
 * Returns:
241
241
 *
242
 
 *      ISC_R_SUCCESS
 
242
 *\li   ISC_R_SUCCESS
243
243
 *
244
 
 *      Any other result is an error.
 
244
 *\li   Any other result is an error.
245
245
 */
246
246
 
247
247
dst_key_t *
248
248
dns_keynode_key(dns_keynode_t *keynode);
249
 
/*
 
249
/*%<
250
250
 * Get the DST key associated with keynode.
251
251
 */
252
252