crypto-factory: Stop after successfully creating one nonce generator
Fixes: e2fc09c186 ("Add nonce generator interface")
This commit is contained in:
@@ -347,6 +347,10 @@ METHOD(crypto_factory_t, create_nonce_gen, nonce_gen_t*,
|
|||||||
while (enumerator->enumerate(enumerator, &entry))
|
while (enumerator->enumerate(enumerator, &entry))
|
||||||
{
|
{
|
||||||
nonce_gen = entry->create_nonce_gen();
|
nonce_gen = entry->create_nonce_gen();
|
||||||
|
if (nonce_gen)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
this->lock->unlock(this->lock);
|
this->lock->unlock(this->lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user