static int push_param_bn(PARAMS_TEMPLATE *tmpl, const char *key,
                         const BIGNUM *bn)
{
    int sz;

    sz = BN_num_bytes(bn);
    if (sz <= 0)
        return 0;
    tmpl->params[tmpl->curr].key = key;
    tmpl->params[tmpl->curr].bnparam = bn;
    tmpl->params[tmpl->curr++].bufsz = (size_t)sz;
    tmpl->totsz += sizeof(OSSL_PARAM) + (size_t)sz;

    return 1;
}