From: Mark Andrews Date: Fri, 24 Feb 2023 01:21:04 +0000 (+1100) Subject: make feature-test --md5 --with-fips aware X-Git-Tag: v9.19.12~38^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ffebd217f56a8bde74f1e334c5cf168a22e5f0b5;p=thirdparty%2Fbind9.git make feature-test --md5 --with-fips aware --- diff --git a/bin/tests/system/feature-test.c b/bin/tests/system/feature-test.c index 00d78f8f207..5b3c504d626 100644 --- a/bin/tests/system/feature-test.c +++ b/bin/tests/system/feature-test.c @@ -198,17 +198,15 @@ main(int argc, char **argv) { } if (strcmp(argv[1], "--md5") == 0) { - unsigned char digest[ISC_MAX_MD_SIZE]; - const unsigned char test[] = "test"; - unsigned int size = sizeof(digest); + isc_mem_t *mctx = NULL; + int answer; - if (isc_md(ISC_MD_MD5, test, sizeof(test), digest, &size) == - ISC_R_SUCCESS) - { - return (0); - } else { - return (1); - } + isc_mem_create(&mctx); + dst_lib_init(mctx, NULL); + answer = dst_algorithm_supported(DST_ALG_HMACMD5) ? 0 : 1; + dst_lib_destroy(); + isc_mem_detach(&mctx); + return (answer); } if (strcmp(argv[1], "--ipv6only=no") == 0) {