keycreate.c revision 5c6e60df66c344107cd33b8a577414c83a046b62
/*
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* 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: keycreate.c,v 1.13 2005/11/30 23:52:54 marka Exp $ */
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <isc/sockaddr.h>
#include <dns/dispatch.h>
#include <dns/fixedname.h>
#include <dns/keyvalues.h>
if ((x) != ISC_R_SUCCESS) { \
exit(-1); \
} \
}
#define PORT 5300
#define TIMEOUT 30
static dns_tsig_keyring_t *ring;
static unsigned char noncedata[16];
static isc_buffer_t nonce;
static dns_requestmgr_t *requestmgr;
static const char *ownername_str = ".";
static void
char keyname[256];
int type;
exit(-1);
}
exit(-1);
}
/*
* Yes, this is a hack.
*/
(char *)isc_buffer_base(&keynamebuf));
return;
}
static void
isc_region_t r;
unsigned char keydata[9];
static char keystr[] = "0123456789ab";
isc_buffer_usedregion(&keybuf, &r);
initialkey = NULL;
&initialkey);
}
int
char *ourkeyname;
int type;
if (argc < 2) {
exit(-1);
}
if (argc >= 3)
dispatchmgr = NULL;
dispatchv4 = NULL;
requestmgr = NULL;
&requestmgr));
&sock));
(void)isc_app_run();
return (0);
}