/*****************************************************************
**
** @(#) zkt.c -- A library for managing a list of dns zone files.
**
** Copyright (c) 2005 - 2008, Holger Zuleger HZnet. All rights reserved.
**
** This software is open source.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
**
** Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer.
**
** Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
**
** Neither the name of Holger Zuleger HZnet nor the names of its contributors may
** be used to endorse or promote products derived from this software without
** specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
** POSSIBILITY OF SUCH DAMAGE.
**
*****************************************************************/
# include <stdio.h>
# include <string.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include "config_zkt.h"
# include "dki.h"
# include "misc.h"
# include "strlist.h"
# include "zconf.h"
# include "domaincmp.h"
# include "tcap.h"
#define extern
# include "zkt.h"
#undef extern
extern char *labellist;
extern int headerflag;
extern int timeflag;
extern int exptimeflag;
extern int lifetime;
extern int ageflag;
extern int lifetimeflag;
extern int kskflag;
extern int zskflag;
extern int pathflag;
extern int ljustflag;
{
{
if ( headerflag )
{
"Tag", "Typ", "Status", "Algorit");
if ( timeflag )
if ( exptimeflag )
if ( ageflag )
if ( lifetimeflag )
putchar ('\n');
}
return;
}
/* TODO: use next line if dname is dynamically allocated */
/* if ( pathflag && dkp->dname && strcmp (oldpath, dkp->dname) != 0 ) */
{
int color;
if ( ljustflag )
else
else
else
if ( timeflag )
if ( exptimeflag )
if ( ageflag )
{
else
putchar (' ');
}
putchar ('\n');
}
}
{
return;
//fprintf (stderr, "listkey %d %d %s\n", which, depth, dkp->name);
{
while ( dkp ) /* loop through list */
{
}
}
}
#endif
{
const char *oldpath;
#endif
if ( data ) /* print headline if list is not empty */
#else
oldpath = "";
{
}
#endif
}
# if 0
{
return;
{
// fprintf (stderr, "list_trustedkey order=%d(pre=0,in=1,post=2,leaf=3) depth=%d %s\n", which, depth, dkp->name);
/* loop through list */
while ( dkp )
{
}
}
}
# else
{
return;
{
// fprintf (stderr, "list_trustedkey order=%d(pre=0,in=1,post=2,leaf=3) depth=%d %s\n", which, depth, dkp->name);
return;
{
/* loop through list */
while ( dkp )
{
}
}
}
}
# endif
#endif
{
/* print headline if list is not empty */
if ( data && headerflag )
printf ("trusted-keys {\n");
#else
#endif
/* print end of trusted-key section */
if ( data && headerflag )
printf ("};\n");
}
{
int ksk;
return;
{
continue;
{
if ( headerflag )
}
}
}
#endif
{
#else
int ksk;
{
continue;
{
if ( headerflag )
}
}
#endif
}
{
int ksk;
return;
{
continue;
}
}
#endif
{
#else
int ksk;
{
continue;
{
}
}
#endif
}
static int searchitem;
{
return;
{
{
if ( searchresult == NULL )
searchresult = dkp;
else
searchitem = 0;
}
}
}
#endif
{
{
searchresult = NULL;
dkp = (void *)01;
else
dkp = searchresult;
}
else
#else
#endif
return dkp;
}