drbg: The drbg instance owns the entropy rng

This commit is contained in:
Andreas Steffen
2019-11-28 09:55:56 +01:00
committed by Tobias Brunner
parent ccaedf8761
commit 11e9d2b8d1
7 changed files with 15 additions and 12 deletions
+2 -1
View File
@@ -715,6 +715,8 @@ START_TEST(test_ntru_privkey)
params = TEST_FUNCTION(ntru, ntru_param_set_get_by_id,
privkey_tests[_i].id);
strength = params->sec_strength_len * BITS_PER_BYTE;
/* entropy rng will be owned by drbg */
entropy = rng_tester_create(privkey_tests[_i].entropy);
drbg = lib->crypto->create_drbg(lib->crypto, DRBG_HMAC_SHA256, strength,
entropy, chunk_from_str("IKE NTRU-KE"));
@@ -802,7 +804,6 @@ START_TEST(test_ntru_privkey)
privkey->destroy(privkey);
pubkey->destroy(pubkey);
drbg->destroy(drbg);
entropy->destroy(entropy);
}
END_TEST