From: Wouter Wijngaards Date: Tue, 30 Sep 2008 11:35:48 +0000 (+0000) Subject: doxygen, detect SHA256 support for test. X-Git-Tag: release-1.1.0~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e5c620f2c908748a46def470b98886050209128;p=thirdparty%2Funbound.git doxygen, detect SHA256 support for test. git-svn-id: file:///svn/unbound/trunk@1274 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/testcode/testbound.c b/testcode/testbound.c index a5860bdfa..591782e1d 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -65,6 +65,7 @@ testbound_usage() printf("\ttest the unbound daemon.\n"); printf("-h this help\n"); printf("-p file playback text file\n"); + printf("-2 detect SHA256 support (exit code 0 or 1)\n"); printf("-o str unbound commandline options separated by spaces.\n"); printf("Version %s\n", PACKAGE_VERSION); printf("BSD licensed, see LICENSE file in source package.\n"); @@ -223,8 +224,17 @@ main(int argc, char* argv[]) pass_argc = 1; pass_argv[0] = "unbound"; add_opts("-d", &pass_argc, pass_argv); - while( (c=getopt(argc, argv, "ho:p:")) != -1) { + while( (c=getopt(argc, argv, "2ho:p:")) != -1) { switch(c) { + case '2': +#ifdef SHA256_DIGEST_LENGTH + printf("SHA256 supported\n"); + exit(0); +#else + printf("SHA256 not supported\n"); + exit(1); +#endif + break; case 'p': playback_file = optarg; break; diff --git a/testdata/03-testbound.tpkg b/testdata/03-testbound.tpkg index e2c8141e2..b060305c5 100644 Binary files a/testdata/03-testbound.tpkg and b/testdata/03-testbound.tpkg differ diff --git a/validator/val_sigcrypt.h b/validator/val_sigcrypt.h index b099a52b8..e395a9da6 100644 --- a/validator/val_sigcrypt.h +++ b/validator/val_sigcrypt.h @@ -99,7 +99,7 @@ int dnskey_algo_is_supported(struct ub_packed_rrset_key* dnskey_rrset, int ds_digest_algo_is_supported(struct ub_packed_rrset_key* ds_rrset, size_t ds_idx); -/* +/** * Get DS RR digest algorithm * @param ds_rrset: DS rrset. * @param ds_idx: which DS.