keycreate.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 2001, 2004, 2005, 2007, 2009, 2011, 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: 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);
&request);
}
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);
}