nonce: Allow overriding the RNG quality used to generate nonces

Usually, changing this won't be necessary (actually, some plugins
specifically use different DRGBs for RNG_WEAK in order to separate
the public nonces from random data used for e.g. DH).
But for experts with special plugin configurations this might be
more flexible and avoids code changes.
This commit is contained in:
Tobias Brunner
2019-04-29 10:49:35 +02:00
parent 75d9dc40d4
commit c546c1ba71
3 changed files with 6 additions and 2 deletions
@@ -43,7 +43,7 @@ METHOD(plugin_t, get_features, int,
static plugin_feature_t f[] = {
PLUGIN_REGISTER(NONCE_GEN, nonce_nonceg_create),
PLUGIN_PROVIDE(NONCE_GEN),
PLUGIN_DEPENDS(RNG, RNG_WEAK),
PLUGIN_DEPENDS(RNG, NONCE_RNG_QUALITY),
};
*features = f;
return countof(f);