Commit 97948468 authored by Mark Andrews's avatar Mark Andrews

dnswkk: send 64 bit noncei in other data

parent cad8548a
Pipeline #17013 passed with stages
in 1 minute and 13 seconds
......@@ -47,6 +47,7 @@
#include <signal.h>
#include <openssl/hmac.h>
#include <openssl/rand.h>
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#define HMAC_CTX_new() &(_ctx), HMAC_CTX_init(&_ctx)
......@@ -1854,9 +1855,12 @@ dotest(struct workitem *item, int usec) {
dp = cp;
ns_put16(0, cp); /* error */
cp += 2;
ns_put16(0, cp); /* other len */
ns_put16(8, cp); /* other len */
cp += 2;
/* no other data */
if (RAND_bytes(cp, 8) != 1) { /* other data */
memset(cp, 0, 8);
}
cp += 8;
if (!HMAC_Update(hmctx, dp, cp - dp)) /* error, other len */
goto error;
if (!HMAC_Final(hmctx, item->mac, NULL))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment