static int drbg_status(void)
{
    DRBG_CTX *dctx = RAND_DRBG_get_default();
    int ret;

    CRYPTO_THREAD_write_lock(dctx->lock);
    ret = dctx->status == DRBG_STATUS_READY ? 1 : 0;
    CRYPTO_THREAD_unlock(dctx->lock);
    return ret;
}