ds.c revision a094c46640de70bb03a9351211fb17c41b6fbbb5
/*
* Copyright (C) 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002, 2003 Internet Software Consortium.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ds.c,v 1.13 2010/12/23 23:47:08 tbox Exp $ */
/*! \file */
#include <config.h>
#include <string.h>
#include <dns/fixedname.h>
#include <dns/rdatastruct.h>
#ifdef HAVE_OPENSSL_GOST
#endif
unsigned int digest_type, unsigned char *buffer,
{
unsigned char digest[ISC_SHA256_DIGESTLENGTH];
isc_region_t r;
isc_buffer_t b;
#ifdef HAVE_OPENSSL_GOST
#endif
return (ISC_R_NOTIMPLEMENTED);
switch (digest_type) {
case DNS_DSDIGEST_SHA1:
dns_name_toregion(name, &r);
dns_rdata_toregion(key, &r);
break;
#ifdef HAVE_OPENSSL_GOST
#define CHECK(x) \
if ((x) != 1) { \
EVP_MD_CTX_cleanup(&ctx); \
return (DST_R_OPENSSLFAILURE); \
}
case DNS_DSDIGEST_GOST:
return (DST_R_OPENSSLFAILURE);
dns_name_toregion(name, &r);
(const void *) r.base,
dns_rdata_toregion(key, &r);
(const void *) r.base,
break;
#endif
default:
dns_name_toregion(name, &r);
dns_rdata_toregion(key, &r);
break;
}
switch (digest_type) {
case DNS_DSDIGEST_SHA1:
break;
#ifdef HAVE_OPENSSL_GOST
case DNS_DSDIGEST_GOST:
break;
#endif
default:
break;
}
&ds, &b));
}
dns_ds_digest_supported(unsigned int digest_type) {
#ifdef HAVE_OPENSSL_GOST
digest_type == DNS_DSDIGEST_GOST));
#else
#endif
}