Commit 4795f0ca authored by Mark Andrews's avatar Mark Andrews

the client cookie was being hashed twice when computing the server cookie for sha1 and sha256

parent dfdc6d61
Pipeline #2512 passed with stages
in 8 minutes and 38 seconds
......@@ -1851,8 +1851,6 @@ compute_cookie(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
INSIST(0);
}
isc_hmacsha1_update(&hmacsha1, cp, length);
isc_hmacsha1_update(&hmacsha1, client->cookie,
sizeof(client->cookie));
isc_hmacsha1_sign(&hmacsha1, digest, sizeof(digest));
isc_buffer_putmem(buf, digest, 8);
isc_hmacsha1_invalidate(&hmacsha1);
......@@ -1888,8 +1886,6 @@ compute_cookie(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
INSIST(0);
}
isc_hmacsha256_update(&hmacsha256, cp, length);
isc_hmacsha256_update(&hmacsha256, client->cookie,
sizeof(client->cookie));
isc_hmacsha256_sign(&hmacsha256, digest, sizeof(digest));
isc_buffer_putmem(buf, digest, 8);
isc_hmacsha256_invalidate(&hmacsha256);
......
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