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