tsigconf.c revision ff2d95be3d5e0350c5b457582cdb08869fc17789
/*
* Copyright (C) 1999-2001, 2004-2007, 2009, 2011, 2012, 2016, 2017 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: tsigconf.c,v 1.35 2011/01/11 23:47:12 tbox Exp $ */
/*! \file */
#include <config.h>
#include <named/tsigconf.h>
static isc_result_t
{
const cfg_listelt_t *element;
int secretalloc = 0;
int secretlen = 0;
{
const char *algstr;
char keynamedata[1024];
const char *secretstr;
/*
* Create the key name.
*/
if (ret != ISC_R_SUCCESS)
goto failure;
/*
* Create the algorithm.
*/
!= ISC_R_SUCCESS) {
"key '%s': has a unsupported algorithm '%s'",
ret = DNS_R_BADALG;
goto failure;
}
goto failure;
}
if (ret != ISC_R_SUCCESS)
goto failure;
if (ret != ISC_R_SUCCESS)
goto failure;
/*
* Set digest bits.
*/
}
return (ISC_R_SUCCESS);
"configuring key '%s': %s", keyid,
return (ret);
}
{
int i;
i = 0;
if (result != ISC_R_SUCCESS)
return (result);
for (i = 0; ; i++) {
break;
if (result != ISC_R_SUCCESS)
continue;
if (result != ISC_R_SUCCESS)
goto failure;
}
return (ISC_R_SUCCESS);
return (result);
}