/*
* Copyright (C) 2006, 2007, 2009-2011, 2013-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: gsstest.c,v 1.19 2011/11/30 00:48:51 marka Exp $ */
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <isc/sockaddr.h>
#include <dns/dispatch.h>
#include <dns/fixedname.h>
#include <dns/keyvalues.h>
#include <dns/masterdump.h>
#include <dns/rdataset.h>
#include <dns/resolver.h>
#ifdef GSSAPI
#include ISC_PLATFORM_GSSAPIHEADER
struct dst_context {
unsigned int magic;
void *opaque;
};
if ((x) != ISC_R_SUCCESS) { \
goto end; \
} \
}
static void setup();
static void
{
int c;
for (;;) {
printf("\nCommand => ");
return;
}
return;
}
return;
}
printf("Unknown command\n");
}
}
static void
goto end;
}
printf("\nReceived Response:\n");
&outbuf);
(char *)isc_buffer_base(&outbuf));
end:
sizeof(*event));
return;
}
static void
{
int c;
printf("Query => ");
if (c == EOF)
return;
dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
goto end;
if (result != ISC_R_SUCCESS)
goto end;
if (result != ISC_R_SUCCESS)
goto end;
printf("Submitting query:\n");
&outbuf);
(char *)isc_buffer_base(&outbuf));
return;
end:
}
static void
goto end;
}
goto end;
}
printf("Received token from server, calling gss_init_sec_context()\n");
printf("Context accepted\n");
if (qtype == dns_rdatatype_tkey) {
printf("Received TKEY response from server\n");
printf("Context completed\n");
} else {
printf("Did not receive TKEY response from server\n");
printf("Context not completed\n");
}
end:
sizeof(*event));
return;
}
static void
int c;
printf("Initctx - GSS name => ");
if (c == EOF)
return;
printf("Negotiating GSSAPI context: ");
printf("\n");
/*
* Setup a GSSAPI context with the server
*/
dns_rootname, 0, NULL);
/* Make name happen */
dns_rootname, 0, NULL);
printf("Calling gss_init_sec_context()\n");
printf("Sending context token to server\n");
return;
end:
sizeof(*event));
}
static void
setup(void)
{
for (;;) {
int c;
printf("Server IP => ");
return;
}
return;
}
}
}
int
/*
* Create and install the default channel.
*/
dispatchmgr = NULL;
dispatchv4 = NULL;
requestmgr = NULL;
&requestmgr));
&sock));
setup();
(void)isc_app_run();
if (tsigkey)
return (0);
}
#else
int
return (0);
}
#endif