From 6ad1a042bcfaa4be4d51a310a69401c1b9204605 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 27 Feb 2018 00:51:59 -0800 Subject: [PATCH] remove hashes test (duplicates lib/isc/tests/hash_test) --- bin/tests/.gitignore | 1 - bin/tests/Makefile.in | 2 +- bin/tests/hashes/Makefile.in | 47 -- bin/tests/hashes/t_hashes.c | 495 ------------------ .../hashes/win32/t_hashes.vcxproj.filters.in | 22 - bin/tests/hashes/win32/t_hashes.vcxproj.in | 110 ---- bin/tests/hashes/win32/t_hashes.vcxproj.user | 3 - configure | 3 +- configure.in | 1 - util/copyrights | 5 - win32utils/Configure | 2 - win32utils/bind9.sln.in | 6 - 12 files changed, 2 insertions(+), 695 deletions(-) delete mode 100644 bin/tests/hashes/Makefile.in delete mode 100644 bin/tests/hashes/t_hashes.c delete mode 100644 bin/tests/hashes/win32/t_hashes.vcxproj.filters.in delete mode 100644 bin/tests/hashes/win32/t_hashes.vcxproj.in delete mode 100644 bin/tests/hashes/win32/t_hashes.vcxproj.user diff --git a/bin/tests/.gitignore b/bin/tests/.gitignore index 600b213895..e43da7f32b 100644 --- a/bin/tests/.gitignore +++ b/bin/tests/.gitignore @@ -8,7 +8,6 @@ t_atomic t_db gsstest t_dst -t_hashes t_mem t_names t_net diff --git a/bin/tests/Makefile.in b/bin/tests/Makefile.in index d533f122c3..693d6abb2e 100644 --- a/bin/tests/Makefile.in +++ b/bin/tests/Makefile.in @@ -32,7 +32,7 @@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ LIBS = @LIBS@ -SUBDIR = atomic db dst mem hashes names net rbt resolver \ +SUBDIR = atomic db dst mem names net rbt resolver \ sockaddr tasks timers system @PKCS11_TOOLS@ optional TESTDIRS = system diff --git a/bin/tests/hashes/Makefile.in b/bin/tests/hashes/Makefile.in deleted file mode 100644 index a1276ff789..0000000000 --- a/bin/tests/hashes/Makefile.in +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) 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/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${TEST_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@ - -CDEFINES = @CRYPTO@ -CWARNINGS = - -ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@ - -ISCDEPLIBS = ../../../lib/isc/libisc.@A@ - -DEPLIBS = ${ISCDEPLIBS} - -LIBS = ${ISCLIBS} ${ISCLIBS} @LIBS@ - -TLIB = ../../../lib/tests/libt_api.@A@ - -TARGETS = t_hashes@EXEEXT@ - -SRCS = t_hashes.c - -@BIND9_MAKE_RULES@ - -t_hashes@EXEEXT@: t_hashes.@O@ ${DEPLIBS} ${TLIB} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ t_hashes.@O@ ${TLIB} ${LIBS} - -test: t_hashes@EXEEXT@ - -@./t_hashes@EXEEXT@ -c @top_srcdir@/t_config -b @srcdir@ -q 60 -a - -testhelp: - @./t_hashes@EXEEXT@ -h - -clean distclean:: - rm -f ${TARGETS} diff --git a/bin/tests/hashes/t_hashes.c b/bin/tests/hashes/t_hashes.c deleted file mode 100644 index 279ccff0ad..0000000000 --- a/bin/tests/hashes/t_hashes.c +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Copyright (C) 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/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* $Id: t_hashes.c,v 1.5 2010/10/04 22:27:41 marka Exp $ */ - -/* - * -d1 or larger shows hash or HMAC result even if correct - */ - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - - -static int nprobs; - -typedef void(*HASH_INIT)(void *); -typedef void(*HMAC_INIT)(void *, const unsigned char *, unsigned int); -typedef void(*UPDATE)(void *, const unsigned char *, unsigned int); -typedef void(*FINAL)(void *, const unsigned char *); -typedef void(*SIGN)(void *, const unsigned char *, unsigned int); - -typedef struct { - const char *name; - const unsigned char *key; - const unsigned int key_len; - const unsigned char *str; - const unsigned int str_len; -} IN_; -#define STR_INIT(s) (const unsigned char *)(s), sizeof(s)-1 - - -union { - unsigned char b[1024]; -#ifndef PK11_MD5_DISABLE - unsigned char md5[16]; -#endif - unsigned char sha1[ISC_SHA1_DIGESTLENGTH]; - unsigned char sha224[ISC_SHA224_DIGESTLENGTH]; - unsigned char sha256[ISC_SHA256_DIGESTLENGTH]; - unsigned char sha384[ISC_SHA384_DIGESTLENGTH]; - unsigned char sha512[ISC_SHA512_DIGESTLENGTH]; -} dbuf; -#define DIGEST_FILL 0xdf - -typedef struct { - const char *str; - const unsigned int digest_len; -} OUT_; - - -/* - * two ad hoc hash examples - */ -static IN_ abc = { "\"abc\"", NULL, 0, STR_INIT("abc")}; -static OUT_ abc_sha1 = { - "a9993e364706816aba3e25717850c26c9cd0d89d", - ISC_SHA1_DIGESTLENGTH}; -static OUT_ abc_sha224 = { - "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7", - ISC_SHA224_DIGESTLENGTH}; -#ifndef PK11_MD5_DISABLE -static OUT_ abc_md5 = { - "900150983cd24fb0d6963f7d28e17f72", - 16}; -#endif - -static IN_ abc_blah = { "\"abcdbc...\"", NULL, 0, - STR_INIT("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq")}; -static OUT_ abc_blah_sha1 = { - "84983e441c3bd26ebaae4aa1f95129e5e54670f1", - ISC_SHA1_DIGESTLENGTH}; -static OUT_ abc_blah_sha224 = { - "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525", - ISC_SHA224_DIGESTLENGTH}; -#ifndef PK11_MD5_DISABLE -static OUT_ abc_blah_md5 = { - "8215ef0796a20bcaaae116d3876c664a", - 16}; - -/* - * three HMAC-md5 examples from RFC 2104 - */ -static const unsigned char rfc2104_1_key[16] = { - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b}; -static IN_ rfc2104_1 = {"RFC 2104 #1", rfc2104_1_key, sizeof(rfc2104_1_key), - STR_INIT("Hi There")}; -static OUT_ rfc2104_1_hmac = { - "9294727a3638bb1c13f48ef8158bfc9d", - 16}; - -static IN_ rfc2104_2 = {"RFC 2104 #2", STR_INIT("Jefe"), - STR_INIT("what do ya want for nothing?")}; -static OUT_ rfc2104_2_hmac = { - "750c783e6ab0b503eaa86e310a5db738", - 16}; - -static const unsigned char rfc2104_3_key[16] = { - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA}; -static const unsigned char rfc2104_3_s[50] = { - 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, - 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, - 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, - 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, - 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, - 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, - 0xDD, 0xDD}; -static IN_ rfc2104_3 = {"RFC 2104 #3", rfc2104_3_key, sizeof(rfc2104_3_key), - rfc2104_3_s, sizeof(rfc2104_3_s)}; -static OUT_ rfc2104_3_hmac = { - "56be34521d144c88dbb8c733f0e8b3f6", - 16}; -#endif - -/* - * four three HMAC-SHA tests cut-and-pasted from RFC 4634 starting on page 86 - */ -static const unsigned char rfc4634_1_key[20] = { - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b -}; -static IN_ rfc4634_1 = {"RFC 4634 #1", rfc4634_1_key, sizeof(rfc4634_1_key), - STR_INIT("Hi There")}; -static OUT_ rfc4634_1_sha1 = { - "B617318655057264E28BC0B6FB378C8EF146BE00", - ISC_SHA1_DIGESTLENGTH}; -static OUT_ rfc4634_1_sha224 = { - "896FB1128ABBDF196832107CD49DF33F47B4B1169912BA4F53684B22", - ISC_SHA224_DIGESTLENGTH}; -static OUT_ rfc4634_1_sha256 = { - "B0344C61D8DB38535CA8AFCEAF0BF12B881DC200C9833DA726E9376C2E32" - "CFF7", - ISC_SHA256_DIGESTLENGTH}; -static OUT_ rfc4634_1_sha384 = { - "AFD03944D84895626B0825F4AB46907F15F9DADBE4101EC682AA034C7CEB" - "C59CFAEA9EA9076EDE7F4AF152E8B2FA9CB6", - ISC_SHA384_DIGESTLENGTH}; -static OUT_ rfc4634_1_sha512 = { - "87AA7CDEA5EF619D4FF0B4241A1D6CB02379F4E2CE4EC2787AD0B30545E1" - "7CDEDAA833B7D6B8A702038B274EAEA3F4E4BE9D914EEB61F1702E696C20" - "3A126854", - ISC_SHA512_DIGESTLENGTH}; - -static IN_ rfc4634_2 = {"RFC 4634 #2", STR_INIT("Jefe"), - STR_INIT("what do ya want for nothing?")}; -static OUT_ rfc4634_2_sha1 = { - "EFFCDF6AE5EB2FA2D27416D5F184DF9C259A7C79", - ISC_SHA1_DIGESTLENGTH}; -static OUT_ rfc4634_2_sha224 = { - "A30E01098BC6DBBF45690F3A7E9E6D0F8BBEA2A39E6148008FD05E44", - ISC_SHA224_DIGESTLENGTH}; -static OUT_ rfc4634_2_sha256 = { - "5BDCC146BF60754E6A042426089575C75A003F089D2739839DEC58B964EC" - "3843", - ISC_SHA256_DIGESTLENGTH}; -static OUT_ rfc4634_2_sha384 = { - "AF45D2E376484031617F78D2B58A6B1B9C7EF464F5A01B47E42EC3736322" - "445E8E2240CA5E69E2C78B3239ECFAB21649", - ISC_SHA384_DIGESTLENGTH}; -static OUT_ rfc4634_2_sha512 = { - "164B7A7BFCF819E2E395FBE73B56E0A387BD64222E831FD610270CD7EA25" - "05549758BF75C05A994A6D034F65F8F0E6FDCAEAB1A34D4A6B4B636E070A" - "38BCE737", - ISC_SHA512_DIGESTLENGTH}; - -static const unsigned char rfc4634_3_key[20] = { - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa -}; -static const unsigned char rfc4634_3_s[50] = { - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd -}; -static IN_ rfc4634_3 = {"RFC 4634 #3", rfc4634_3_key, sizeof(rfc4634_3_key), - rfc4634_3_s, sizeof(rfc4634_3_s)}; -static OUT_ rfc4634_3_sha1 = { - "125D7342B9AC11CD91A39AF48AA17B4F63F175D3", - ISC_SHA1_DIGESTLENGTH}; -static OUT_ rfc4634_3_sha224 = { - "7FB3CB3588C6C1F6FFA9694D7D6AD2649365B0C1F65D69D1EC8333EA", - ISC_SHA224_DIGESTLENGTH}; -static OUT_ rfc4634_3_sha256 = { - "773EA91E36800E46854DB8EBD09181A72959098B3EF8C122D9635514CED5" - "65FE", - ISC_SHA256_DIGESTLENGTH}; -static OUT_ rfc4634_3_sha384 = { - "88062608D3E6AD8A0AA2ACE014C8A86F0AA635D947AC9FEBE83EF4E55966" - "144B2A5AB39DC13814B94E3AB6E101A34F27", - ISC_SHA384_DIGESTLENGTH}; -static OUT_ rfc4634_3_sha512 = { - "FA73B0089D56A284EFB0F0756C890BE9B1B5DBDD8EE81A3655F83E33B227" - "9D39BF3E848279A722C806B485A47E67C807B946A337BEE8942674278859" - "E13292FB", - ISC_SHA512_DIGESTLENGTH}; - -static const unsigned char rfc4634_4_key[25] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, - 0x15, 0x16, 0x17, 0x18, 0x19 -}; -static const unsigned char rfc4634_4_s[50] = { - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd -}; -static IN_ rfc4634_4 = {"RFC 4634 #3", rfc4634_4_key, sizeof(rfc4634_4_key), - rfc4634_4_s, sizeof(rfc4634_4_s)}; -static OUT_ rfc4634_4_sha1 = { - "4C9007F4026250C6BC8414F9BF50C86C2D7235DA", - ISC_SHA1_DIGESTLENGTH}; -static OUT_ rfc4634_4_sha224 = { - "6C11506874013CAC6A2ABC1BB382627CEC6A90D86EFC012DE7AFEC5A", - ISC_SHA224_DIGESTLENGTH}; -static OUT_ rfc4634_4_sha256 = { - "82558A389A443C0EA4CC819899F2083A85F0FAA3E578F8077A2E3FF46729" - "665B", - ISC_SHA256_DIGESTLENGTH}; -static OUT_ rfc4634_4_sha384 = { - "3E8A69B7783C25851933AB6290AF6CA77A9981480850009CC5577C6E1F57" - "3B4E6801DD23C4A7D679CCF8A386C674CFFB", - ISC_SHA384_DIGESTLENGTH}; -static OUT_ rfc4634_4_sha512 = { - "B0BA465637458C6990E5A8C5F61D4AF7E576D97FF94B872DE76F8050361E" - "E3DBA91CA5C11AA25EB4D679275CC5788063A5F19741120C4F2DE2ADEBEB" - "10A298DD", - ISC_SHA512_DIGESTLENGTH}; - - - -static const char * -d2str(char *buf, unsigned int buf_len, - const unsigned char *d, unsigned int d_len) -{ - unsigned int i, l; - - l = 0; - for (i = 0; i < d_len && l < buf_len-4; ++i) { - l += snprintf(&buf[l], buf_len-l, "%02x", d[i]); - } - if (l >= buf_len-3) { - REQUIRE(buf_len > sizeof("...")); - strcpy(&buf[l-sizeof(" ...")], " ..."); - } - return buf; -} - - - -/* - * Compare binary digest or HMAC to string of hex digits from an RFC - */ -static void -ck(const char *name, const IN_ *in, const OUT_ *out) -{ - char buf[sizeof(dbuf)*2+1]; - const char *str_name; - unsigned int l; - - d2str(buf, sizeof(buf), dbuf.b, out->digest_len); - str_name = in->name != NULL ? in->name : (const char *)in->str; - - if (T_debug != 0) - t_info("%s(%s) = %s\n", name, str_name, buf); - - if (strcasecmp(buf, out->str)) { - t_info("%s(%s)\n%9s %s\n%9s %s\n", - name, str_name, - "is", buf, - "should be", out->str); - ++nprobs; - return; - } - - /* - * check that the hash or HMAC is no longer than we think it is - */ - for (l = out->digest_len; l < sizeof(dbuf); ++l) { - if (dbuf.b[l] != DIGEST_FILL) { - t_info("byte #%d after end of %s(%s) changed to %02x\n", - l-out->digest_len, name, str_name, dbuf.b[l]); - ++nprobs; - break; - } - } -} - - - -static void -t_hash(const char *hname, HASH_INIT init, UPDATE update, FINAL final, - IN_ *in, OUT_ *out) -{ - union { - unsigned char b[1024]; - isc_sha1_t sha1; -#ifndef PK11_MD5_DISABLE - isc_md5_t md5; -#endif - } ctx; - - init(&ctx); - update(&ctx, in->str, in->str_len); - memset(dbuf.b, DIGEST_FILL, sizeof(dbuf)); - final(&ctx, dbuf.b); - ck(hname, in, out); -} - - - -/* - * isc_sha224_final has a different calling sequence - */ -static void -t_sha224(IN_ *in, OUT_ *out) -{ - isc_sha224_t ctx; - - memset(dbuf.b, DIGEST_FILL, sizeof(dbuf)); - isc_sha224_init(&ctx); - isc_sha224_update(&ctx, in->str, in->str_len); - memset(dbuf.b, DIGEST_FILL, sizeof(dbuf)); - isc_sha224_final(dbuf.b, &ctx); - ck("SHA224", in, out); -} - - - -static void -#ifndef PK11_MD5_DISABLE -t_hashes(IN_ *in, OUT_ *out_sha1, OUT_ *out_sha224, OUT_ *out_md5) -#else -t_hashes(IN_ *in, OUT_ *out_sha1, OUT_ *out_sha224) -#endif -{ - t_hash("SHA1", (HASH_INIT)isc_sha1_init, (UPDATE)isc_sha1_update, - (FINAL)isc_sha1_final, in, out_sha1); - t_sha224(in, out_sha224); -#ifndef PK11_MD5_DISABLE - t_hash("md5", (HASH_INIT)isc_md5_init, (UPDATE)isc_md5_update, - (FINAL)isc_md5_final, in, out_md5); -#endif -} - - -#ifndef PK11_MD5_DISABLE -/* - * isc_hmacmd5_sign has a different calling sequence - */ -static void -t_md5hmac(IN_ *in, OUT_ *out) -{ - isc_hmacmd5_t ctx; - - isc_hmacmd5_init(&ctx, in->key, in->key_len); - isc_hmacmd5_update(&ctx, in->str, in->str_len); - memset(dbuf.b, DIGEST_FILL, sizeof(dbuf)); - isc_hmacmd5_sign(&ctx, dbuf.b); - ck("HMAC-md5", in, out); -} -#endif - - -static void -t_hmac(const char *hname, HMAC_INIT init, UPDATE update, SIGN sign, - IN_ *in, OUT_ *out) -{ - union { - unsigned char b[1024]; -#ifndef PK11_MD5_DISABLE - isc_hmacmd5_t hmacmd5; -#endif - isc_hmacsha1_t hmacsha1; - isc_hmacsha224_t hmacsha224; - isc_hmacsha256_t hmacsha256; - isc_hmacsha384_t hmacsha384; - isc_hmacsha512_t hmacsha512; - } ctx; - - init(&ctx, in->key, in->key_len); - update(&ctx, in->str, in->str_len); - memset(dbuf.b, DIGEST_FILL, sizeof(dbuf)); - sign(&ctx, dbuf.b, out->digest_len); - ck(hname, in, out); -} - - - -static void -t_hmacs(IN_ *in, OUT_ *out_sha1, OUT_ *out_sha224, OUT_ *out_sha256, - OUT_ *out_sha384, OUT_ *out_sha512) -{ - t_hmac("HMAC-SHA1", (HMAC_INIT)isc_hmacsha1_init, - (UPDATE)isc_hmacsha1_update, (SIGN)isc_hmacsha1_sign, - in, out_sha1); - t_hmac("HMAC-SHA224", (HMAC_INIT)isc_hmacsha224_init, - (UPDATE)isc_hmacsha224_update, (SIGN)isc_hmacsha224_sign, - in, out_sha224); - t_hmac("HMAC-SHA256", (HMAC_INIT)isc_hmacsha256_init, - (UPDATE)isc_hmacsha256_update, (SIGN)isc_hmacsha256_sign, - in, out_sha256); - t_hmac("HMAC-SHA384", (HMAC_INIT)isc_hmacsha384_init, - (UPDATE)isc_hmacsha384_update, (SIGN)isc_hmacsha384_sign, - in, out_sha384); - t_hmac("HMAC-SHA512", (HMAC_INIT)isc_hmacsha512_init, - (UPDATE)isc_hmacsha512_update, (SIGN)isc_hmacsha512_sign, - in, out_sha512); -} - - - -/* - * This will almost never fail, and so there is no need for the extra noise - * that would come from breaking it into several tests. - */ -static void -t1(void) -{ - /* - * two ad hoc hash examples - */ -#ifndef PK11_MD5_DISABLE - t_hashes(&abc, &abc_sha1, &abc_sha224, &abc_md5); - t_hashes(&abc_blah, &abc_blah_sha1, &abc_blah_sha224, &abc_blah_md5); -#else - t_hashes(&abc, &abc_sha1, &abc_sha224); - t_hashes(&abc_blah, &abc_blah_sha1, &abc_blah_sha224); -#endif - -#ifndef PK11_MD5_DISABLE - /* - * three HMAC-md5 examples from RFC 2104 - */ - t_md5hmac(&rfc2104_1, &rfc2104_1_hmac); - t_md5hmac(&rfc2104_2, &rfc2104_2_hmac); - t_md5hmac(&rfc2104_3, &rfc2104_3_hmac); -#endif - - /* - * four HMAC-SHA tests from RFC 4634 starting on page 86 - */ - t_hmacs(&rfc4634_1, &rfc4634_1_sha1, &rfc4634_1_sha224, - &rfc4634_1_sha256, &rfc4634_1_sha384, &rfc4634_1_sha512); - t_hmacs(&rfc4634_2, &rfc4634_2_sha1, &rfc4634_2_sha224, - &rfc4634_2_sha256, &rfc4634_2_sha384, &rfc4634_2_sha512); - t_hmacs(&rfc4634_3, &rfc4634_3_sha1, &rfc4634_3_sha224, - &rfc4634_3_sha256, &rfc4634_3_sha384, &rfc4634_3_sha512); - t_hmacs(&rfc4634_4, &rfc4634_4_sha1, &rfc4634_4_sha224, - &rfc4634_4_sha256, &rfc4634_4_sha384, &rfc4634_4_sha512); - - if (nprobs != 0) - t_result(T_FAIL); - else - t_result(T_PASS); -} - - -testspec_t T_testlist[] = { - { (PFV) t1, "hashes" }, - { (PFV) 0, NULL } -}; - -#ifdef WIN32 -int -main(int argc, char **argv) { - t_settests(T_testlist); - return (t_main(argc, argv)); -} -#endif diff --git a/bin/tests/hashes/win32/t_hashes.vcxproj.filters.in b/bin/tests/hashes/win32/t_hashes.vcxproj.filters.in deleted file mode 100644 index 0f4bd9c4b2..0000000000 --- a/bin/tests/hashes/win32/t_hashes.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tests/hashes/win32/t_hashes.vcxproj.in b/bin/tests/hashes/win32/t_hashes.vcxproj.in deleted file mode 100644 index 6af5cb5176..0000000000 --- a/bin/tests/hashes/win32/t_hashes.vcxproj.in +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {14071120-84F6-4A6F-BF23-90EC5D0372CE} - Win32Proj - t_hashes - - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - true - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - - - false - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\tests\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\tests\win32\$(Configuration);%(AdditionalLibraryDirectories) - @LIBXML2_LIB@libisc.lib;libtests.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\tests\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\tests\win32\$(Configuration);%(AdditionalLibraryDirectories) - @LIBXML2_LIB@libisc.lib;libtests.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - - diff --git a/bin/tests/hashes/win32/t_hashes.vcxproj.user b/bin/tests/hashes/win32/t_hashes.vcxproj.user deleted file mode 100644 index 695b5c78b9..0000000000 --- a/bin/tests/hashes/win32/t_hashes.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/configure b/configure index c3ca897774..8a3febf9c2 100755 --- a/configure +++ b/configure @@ -24157,7 +24157,7 @@ ac_config_commands="$ac_config_commands chmod" # elsewhere if there's a good reason for doing so. # -ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/atomic/Makefile bin/tests/db/Makefile bin/tests/dst/Makefile bin/tests/dst/Kdh.+002+18602.key bin/tests/dst/Kdh.+002+18602.private bin/tests/dst/Kdh.+002+48957.key bin/tests/dst/Kdh.+002+48957.private bin/tests/dst/Ktest.+001+00002.key bin/tests/dst/Ktest.+001+54622.key bin/tests/dst/Ktest.+001+54622.private bin/tests/dst/Ktest.+003+23616.key bin/tests/dst/Ktest.+003+23616.private bin/tests/dst/Ktest.+003+49667.key bin/tests/dst/dst_2_data bin/tests/dst/t2_data_1 bin/tests/dst/t2_data_2 bin/tests/dst/t2_dsasig bin/tests/dst/t2_rsasig bin/tests/hashes/Makefile bin/tests/headerdep_test.sh bin/tests/mem/Makefile bin/tests/names/Makefile bin/tests/net/Makefile bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/rbt/Makefile bin/tests/resolver/Makefile bin/tests/sockaddr/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/inline/checkdsa.sh bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/tasks/Makefile bin/tests/timers/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/Makefile unit/unittest.sh" +ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/atomic/Makefile bin/tests/db/Makefile bin/tests/dst/Makefile bin/tests/dst/Kdh.+002+18602.key bin/tests/dst/Kdh.+002+18602.private bin/tests/dst/Kdh.+002+48957.key bin/tests/dst/Kdh.+002+48957.private bin/tests/dst/Ktest.+001+00002.key bin/tests/dst/Ktest.+001+54622.key bin/tests/dst/Ktest.+001+54622.private bin/tests/dst/Ktest.+003+23616.key bin/tests/dst/Ktest.+003+23616.private bin/tests/dst/Ktest.+003+49667.key bin/tests/dst/dst_2_data bin/tests/dst/t2_data_1 bin/tests/dst/t2_data_2 bin/tests/dst/t2_dsasig bin/tests/dst/t2_rsasig bin/tests/headerdep_test.sh bin/tests/mem/Makefile bin/tests/names/Makefile bin/tests/net/Makefile bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/rbt/Makefile bin/tests/resolver/Makefile bin/tests/sockaddr/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/inline/checkdsa.sh bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/tasks/Makefile bin/tests/timers/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/Makefile unit/unittest.sh" # @@ -25214,7 +25214,6 @@ do "bin/tests/dst/t2_data_2") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_data_2" ;; "bin/tests/dst/t2_dsasig") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_dsasig" ;; "bin/tests/dst/t2_rsasig") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_rsasig" ;; - "bin/tests/hashes/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/hashes/Makefile" ;; "bin/tests/headerdep_test.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/headerdep_test.sh" ;; "bin/tests/mem/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/mem/Makefile" ;; "bin/tests/names/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/names/Makefile" ;; diff --git a/configure.in b/configure.in index 45c801bb1b..4b85c0251d 100644 --- a/configure.in +++ b/configure.in @@ -5331,7 +5331,6 @@ AC_CONFIG_FILES([ bin/tests/dst/t2_data_2 bin/tests/dst/t2_dsasig bin/tests/dst/t2_rsasig - bin/tests/hashes/Makefile bin/tests/headerdep_test.sh bin/tests/mem/Makefile bin/tests/names/Makefile diff --git a/util/copyrights b/util/copyrights index 60ff5e21ec..21041aa4de 100644 --- a/util/copyrights +++ b/util/copyrights @@ -434,11 +434,6 @@ ./bin/tests/fromhex.pl PERL 2015,2016,2018 ./bin/tests/fsaccess_test.c C 2000,2001,2004,2005,2007,2012,2015,2016,2018 ./bin/tests/hash_test.c C 2000,2001,2004,2005,2006,2007,2014,2015,2016,2017,2018 -./bin/tests/hashes/Makefile.in MAKE 2010,2012,2014,2016,2017,2018 -./bin/tests/hashes/t_hashes.c C 2010,2013,2016,2018 -./bin/tests/hashes/win32/t_hashes.vcxproj.filters.in X 2013,2015,2018 -./bin/tests/hashes/win32/t_hashes.vcxproj.in X 2013,2015,2016,2017,2018 -./bin/tests/hashes/win32/t_hashes.vcxproj.user X 2013,2018 ./bin/tests/headerdep_test.sh.in SH 2000,2001,2004,2007,2012,2016,2018 ./bin/tests/inter_test.c C 2000,2001,2003,2004,2005,2007,2008,2015,2016,2018 ./bin/tests/keyboard_test.c C 2000,2001,2004,2005,2007,2015,2016,2018 diff --git a/win32utils/Configure b/win32utils/Configure index 67e66ca4fb..9bb5f2c8b5 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -124,8 +124,6 @@ my @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj", "..\\bin\\tests\\dst\\win32\\t_dst.vcxproj.filters", "..\\bin\\tests\\mem\\win32\\t_mem.vcxproj", "..\\bin\\tests\\mem\\win32\\t_mem.vcxproj.filters", - "..\\bin\\tests\\hashes\\win32\\t_hashes.vcxproj", - "..\\bin\\tests\\hashes\\win32\\t_hashes.vcxproj.filters", "..\\bin\\tests\\names\\win32\\t_names.vcxproj", "..\\bin\\tests\\names\\win32\\t_names.vcxproj.filters", "..\\bin\\tests\\rbt\\win32\\t_rbt.vcxproj", diff --git a/win32utils/bind9.sln.in b/win32utils/bind9.sln.in index fe048da5d5..f79e54f619 100644 --- a/win32utils/bind9.sln.in +++ b/win32utils/bind9.sln.in @@ -530,12 +530,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t_mem", "..\bin\tests\mem\w {F6F08940-7597-4FEE-9CE0-E09A009C45A3} = {F6F08940-7597-4FEE-9CE0-E09A009C45A3} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t_hashes", "..\bin\tests\hashes\win32\t_hashes.vcxproj", "{14071120-84F6-4A6F-BF23-90EC5D0372CE}" - ProjectSection(ProjectDependencies) = postProject - {3840E563-D180-4761-AA9C-E6155F02EAFF} = {3840E563-D180-4761-AA9C-E6155F02EAFF} - {F6F08940-7597-4FEE-9CE0-E09A009C45A3} = {F6F08940-7597-4FEE-9CE0-E09A009C45A3} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t_names", "..\bin\tests\names\win32\t_names.vcxproj", "{124DC0D3-3096-41D2-B490-CE85E890FF33}" ProjectSection(ProjectDependencies) = postProject {A3F71D12-F38A-4C77-8D87-8E8854CA74A1} = {A3F71D12-F38A-4C77-8D87-8E8854CA74A1}