keymat_v2: Properly wipe DH secret during IKE_SA rekeying

While `secret` is wiped explicitly, it wasn't when concatenating with
the nonces.
This commit is contained in:
Tobias Brunner
2021-09-20 16:10:03 +02:00
parent 91896264b2
commit a5662e8f6e
+1 -1
View File
@@ -387,7 +387,7 @@ METHOD(keymat_v2_t, derive_ike_keys, bool,
chunk_clear(&prf_plus_seed);
return FALSE;
}
secret = chunk_cat("mc", secret, full_nonce);
secret = chunk_cat("sc", secret, full_nonce);
if (rekey_prf->set_key(rekey_prf, rekey_skd) &&
rekey_prf->allocate_bytes(rekey_prf, secret, &skeyseed) &&
rekey_prf->set_key(rekey_prf, skeyseed))