private_test.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 2011, 2012, 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$ */
/*! \file */
#include <config.h>
#include <atf-c.h>
#include <unistd.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include "dnstest.h"
typedef struct {
unsigned char alg;
typedef struct {
unsigned char hash;
unsigned char flags;
unsigned int iterations;
unsigned long salt;
/*
* Helper functions
*/
static void
{
}
static void
unsigned char *pbuf)
{
unsigned char *sp;
int slen = 4;
/* for simplicity, we're using a maximum salt length of 4 */
slen--;
sp++;
}
} else {
}
}
/*
* Individual unit tests
*/
"convert private signing records to text");
}
int i;
signing_testcase_t testcases[] = {
{ DST_ALG_RSASHA512, 12345, 0, 0 },
};
const char *results[] = {
"Signing with key 12345/RSASHA512",
"Removing signatures for key 54321/RSASHA256",
"Done signing with key 22222/NSEC3RSASHA1",
"Done removing signatures for key 33333/RSASHA1"
};
int ncases = 4;
for (i = 0; i < ncases; i++) {
unsigned char data[5];
}
dns_test_end();
}
}
int i;
nsec3_testcase_t testcases[] = {
{ 1, 0, 1, 0xbeef, 0, 0, 0 },
{ 1, 1, 10, 0xdadd, 0, 0, 0 },
{ 1, 0, 20, 0xbead, 0, 1, 0 },
{ 1, 0, 30, 0xdeaf, 1, 0, 0 },
{ 1, 0, 100, 0xfeedabee, 1, 0, 1 },
};
const char *results[] = {
"Creating NSEC3 chain 1 0 1 BEEF",
"Creating NSEC3 chain 1 1 10 DADD",
"Pending NSEC3 chain 1 0 20 BEAD",
"Removing NSEC3 chain 1 0 30 DEAF / creating NSEC chain",
"Removing NSEC3 chain 1 0 100 FEEDABEE"
};
int ncases = 5;
for (i = 0; i < ncases; i++) {
}
dns_test_end();
}
/*
* Main
*/
ATF_TP_ADD_TCS(tp) {
return (atf_no_error());
}