if_wg: fix build with DIAGNOSTICS
This file got resynced with OpenBSD to pick up fixes that had taken place after the version initially ported to FreeBSD. KASSERT there is more like MPASS here. Reported by: David Wolfskill <david@catwhisker.org>
This commit is contained in:
parent
cefb959e18
commit
ff92a03616
@ -784,10 +784,10 @@ noise_kdf(uint8_t *a, uint8_t *b, uint8_t *c, const uint8_t *x,
|
||||
uint8_t sec[BLAKE2S_HASH_SIZE];
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
KASSERT(a_len <= BLAKE2S_HASH_SIZE && b_len <= BLAKE2S_HASH_SIZE &&
|
||||
MPASS(a_len <= BLAKE2S_HASH_SIZE && b_len <= BLAKE2S_HASH_SIZE &&
|
||||
c_len <= BLAKE2S_HASH_SIZE);
|
||||
KASSERT(!(b || b_len || c || c_len) || (a && a_len));
|
||||
KASSERT(!(c || c_len) || (b && b_len));
|
||||
MPASS(!(b || b_len || c || c_len) || (a && a_len));
|
||||
MPASS(!(c || c_len) || (b && b_len));
|
||||
#endif
|
||||
|
||||
/* Extract entropy from "x" into sec */
|
||||
|
Loading…
Reference in New Issue
Block a user