diff -Naur nsd-3.2.14-orig/tsig-openssl.c nsd-3.2.14/tsig-openssl.c
--- nsd-3.2.14-orig/tsig-openssl.c 2012-05-31 09:48:19.000000000 -0400
+++ nsd-3.2.14/tsig-openssl.c 2013-01-03 00:19:26.337086846 -0500
@@ -31,7 +31,9 @@
hmac_algorithm = EVP_get_digestbyname(digest);
if (!hmac_algorithm) {
- log_msg(LOG_ERR, "%s digest not available", digest);
+ /* skip, but do not error
+ * log_msg(LOG_ERR, "%s digest not available", digest);
+ */
return 0;
}
@@ -58,21 +60,19 @@
int
tsig_openssl_init(region_type *region)
{
+ int count = 0;
OpenSSL_add_all_digests();
- /* TODO: walk lookup supported algorithms table */
- if (!tsig_openssl_init_algorithm(region, "md5", "hmac-md5","hmac-md5.sig-alg.reg.int."))
- return 0;
+ count += !tsig_openssl_init_algorithm(region, "md5", "hmac-md5","hmac-md5.sig-alg.reg.int.");
+
#ifdef HAVE_EVP_SHA1
- if (!tsig_openssl_init_algorithm(region, "sha1", "hmac-sha1", "hmac-sha1."))
- return 0;
+ count += !tsig_openssl_init_algorithm(region, "sha1", "hmac-sha1", "hmac-sha1.");
#endif /* HAVE_EVP_SHA1 */
#ifdef HAVE_EVP_SHA256
- if (!tsig_openssl_init_algorithm(region, "sha256", "hmac-sha256", "hmac-sha256."))
- return 0;
+ count +=!tsig_openssl_init_algorithm(region, "sha256", "hmac-sha256", "hmac-sha256.");
#endif /* HAVE_EVP_SHA256 */
- return 1;
+ return count;
}
static void