/*
* Copyright (C) 2002-2007, 2010, 2012, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $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>
#if defined(HAVE_OPENSSL_GOST) || defined(HAVE_PKCS11_GOST)
#include "dst_gost.h"
#endif
unsigned int digest_type, unsigned char *buffer,
{
isc_region_t r;
isc_buffer_t b;
#if defined(HAVE_OPENSSL_GOST) || defined(HAVE_PKCS11_GOST)
#endif
return (ISC_R_NOTIMPLEMENTED);
switch (digest_type) {
case DNS_DSDIGEST_SHA1:
dns_name_toregion(name, &r);
dns_rdata_toregion(key, &r);
break;
#if defined(HAVE_OPENSSL_GOST) || defined(HAVE_PKCS11_GOST)
#define RETERR(x) do { \
isc_result_t ret = (x); \
if (ret != ISC_R_SUCCESS) { \
isc_gost_invalidate(&gost); \
return (ret); \
} \
} while (0)
case DNS_DSDIGEST_GOST:
dns_name_toregion(name, &r);
dns_rdata_toregion(key, &r);
break;
#endif
case DNS_DSDIGEST_SHA384:
dns_name_toregion(name, &r);
dns_rdata_toregion(key, &r);
break;
case DNS_DSDIGEST_SHA256:
default:
dns_name_toregion(name, &r);
dns_rdata_toregion(key, &r);
break;
}
switch (digest_type) {
case DNS_DSDIGEST_SHA1:
break;
#if defined(HAVE_OPENSSL_GOST) || defined(HAVE_PKCS11_GOST)
case DNS_DSDIGEST_GOST:
break;
#endif
case DNS_DSDIGEST_SHA384:
break;
case DNS_DSDIGEST_SHA256:
default:
break;
}
&ds, &b));
}