]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
doxygen, detect SHA256 support for test.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 30 Sep 2008 11:35:48 +0000 (11:35 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 30 Sep 2008 11:35:48 +0000 (11:35 +0000)
git-svn-id: file:///svn/unbound/trunk@1274 be551aaa-1e26-0410-a405-d3ace91eadb9

testcode/testbound.c
testdata/03-testbound.tpkg
validator/val_sigcrypt.h

index a5860bdfab37b4f9c5b5b367e3284839bac8e970..591782e1dec7ac181bd2ebb991f6a42ff5b26b2f 100644 (file)
@@ -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;
index e2c8141e2acb6556789c3db101aca11948565c66..b060305c57dcd3ba106e36fd9954f2259f59b4ae 100644 (file)
Binary files a/testdata/03-testbound.tpkg and b/testdata/03-testbound.tpkg differ
index b099a52b8629a4626b237f55db2c6146555e3d5a..e395a9da6f225ce5baaaef18f706a551b35ae8bc 100644 (file)
@@ -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.