tkey.c revision 4d6ad568197373af2bd635f228d983138a72371a
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * Copyright (C) 1999, 2000 Internet Software Consortium.
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * Permission to use, copy, modify, and distribute this software for any
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * purpose with or without fee is hereby granted, provided that the above
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * copyright notice and this permission notice appear in all copies.
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * $Id: tkey.c,v 1.24 2000/03/08 20:15:16 bwelling Exp $
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * Principal Author: Brian Wellington
#include <string.h>
#define RETERR(x) do { \
result = (x); \
goto failure; \
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
isc_buffer_t b;
return (ISC_R_NOSPACE);
for (i = 0; i < sizeof(digests); i++)
return result;
static isc_result_t
unsigned int sharedsize;
&keyset);
&keyrdata,
&pubkey);
goto got_key;
if (!found_key) {
if (found_incompatible) {
return (ISC_R_SUCCESS);
return (DNS_R_FORMERR);
namelist));
&ournameout));
ourttl = 0;
namelist));
goto failure;
return (ISC_R_SUCCESS);
goto failure;
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
return (DNS_R_REFUSED);
return (ISC_R_SUCCESS);
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
goto failure_with_tkey;
goto failure;
goto failure_with_tkey;
case DNS_TKEYMODE_DELETE:
case DNS_TKEYMODE_GSSAPI:
goto failure;
goto failure;
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
isc_region_t r;
r.length = 0;
dns_rdatatype_key, &r);
dynbuf));
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
&tkeyset);
return (result);
return (ISC_R_SUCCESS);
return (ISC_R_NOTFOUND);
return (result);
unsigned int sharedsize;
goto failure;
&ourkeyset));
&theirkeyname);
goto next;
0, &theirkeyset);
next:
goto failure;
return (result);
return (result);
goto failure;
return (result);