keycreate.c revision d58e33bfabfee19a035031dac633d36659738d56
/*
* Copyright (C) 2004, 2005, 2007, 2009, 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 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: keycreate.c,v 1.20 2011/01/11 23:47:13 tbox 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);
}