BIND 10 trac936, updated. 89e3ffaa1fb56bcc76f626a64afcc25e506d8b54 [trac936] always fail on secret_len == 0

BIND 10 source code commits bind10-changes at lists.isc.org
Wed May 18 19:11:19 UTC 2011


The branch, trac936 has been updated
       via  89e3ffaa1fb56bcc76f626a64afcc25e506d8b54 (commit)
      from  71eb80242fd144bddc06c98b3bdaa91341a65f26 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 89e3ffaa1fb56bcc76f626a64afcc25e506d8b54
Author: Jelte Jansen <jelte at isc.org>
Date:   Wed May 18 21:10:06 2011 +0200

    [trac936] always fail on secret_len == 0

-----------------------------------------------------------------------

Summary of changes:
 src/lib/cryptolink/crypto_hmac.cc |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/cryptolink/crypto_hmac.cc b/src/lib/cryptolink/crypto_hmac.cc
index d5a733b..9aa9d24 100644
--- a/src/lib/cryptolink/crypto_hmac.cc
+++ b/src/lib/cryptolink/crypto_hmac.cc
@@ -88,13 +88,11 @@ public:
                                   secret_len);
                 hmac_->set_key(hashed_key.begin(), hashed_key.size());
             } else {
-                // Apparently 1.9 considers 0 a valid secret length.
-                // We do not.
-#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,0)
+                // Botan 1.8 considers len 0 a bad key. 1.9 does not,
+                // but we won't accept it anyway, and fail early
                 if (secret_len == 0) {
                     isc_throw(BadKey, "Bad HMAC secret length: 0");
                 }
-#endif
                 hmac_->set_key(static_cast<const Botan::byte*>(secret),
                                secret_len);
             }




More information about the bind10-changes mailing list