botan: Use strongSwan's RNG interface in Botan plugin
This allows using rng_t implementations provided by other plugins to serve as RNG for Botan. Closes strongswan/strongswan#192.
This commit is contained in:
committed by
Tobias Brunner
parent
5ffc1ec423
commit
4261fcedec
@@ -369,7 +369,7 @@ botan_rsa_private_key_t *botan_rsa_private_key_gen(key_type_t type,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (botan_rng_init(&rng, "system"))
|
||||
if (!botan_get_rng(&rng, RNG_TRUE))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -448,7 +448,7 @@ static bool calculate_pq(botan_mp_t *n, botan_mp_t *e, botan_mp_t *d,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (botan_rng_init(&rng, "user"))
|
||||
if (!botan_get_rng(&rng, RNG_STRONG))
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user