{
unsigned char *tout, *p;
size_t bl = dctx->entropy_blocklen, rv;
+ if (!dctx->get_entropy)
+ return 0;
if (dctx->xflags & DRBG_FLAG_TEST || !bl)
return dctx->get_entropy(dctx, pout, entropy, min_len, max_len);
rv = dctx->get_entropy(dctx, &tout, entropy + bl,
goto end;
}
- if (dctx->max_nonce > 0)
+ if (dctx->max_nonce > 0 && dctx->get_nonce)
{
noncelen = dctx->get_nonce(dctx, &nonce,
dctx->strength / 2,
static int drbg_stick = 0;
-void FIPS_drbg_stick(void)
+void FIPS_drbg_stick(int onoff)
{
- drbg_stick = 1;
+ drbg_stick = onoff;
}
/* Continuous DRBG utility function */