2 * Copyright (C) 2004-2007, 2010, 2012 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2002 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* $Id: ds.h,v 1.12 2010/12/23 23:47:08 tbox Exp $ */
25 #include <dns/types.h>
27 #define DNS_DSDIGEST_SHA1 (1)
28 #define DNS_DSDIGEST_SHA256 (2)
29 #define DNS_DSDIGEST_GOST (3)
30 #define DNS_DSDIGEST_SHA384 (4)
32 /* should not be here... */
34 #define ISC_GOST_DIGESTLENGTH 32U
37 * Assuming SHA-384 digest type.
39 #define DNS_DS_BUFFERSIZE (52)
44 dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
45 unsigned int digest_type, unsigned char *buffer,
48 * Build the rdata of a DS record.
51 *\li key Points to a valid DNS KEY record.
52 *\li buffer Points to a temporary buffer of at least
53 * #DNS_DS_BUFFERSIZE bytes.
54 *\li rdata Points to an initialized dns_rdata_t.
57 * \li *rdata Contains a valid DS rdata. The 'data' member refers
62 dns_ds_digest_supported(unsigned int digest_type);
64 * Is this digest algorithm supported by dns_ds_buildrdata()?