static int dh_init(void *vpdhctx, void *vdh)
{
    PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx;

    DH_free(pdhctx->dh);
    pdhctx->dh = vdh;
    DH_up_ref(pdhctx->dh);

    return pdhctx->dh != NULL;
}