int EC_KEY_set_private_key()

in source/ec_override.c [130:141]


int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv) {
    assert(key);
    assert(bignum_is_valid(prv));

    if (key->group == NULL || nondet_bool()) {
        return 0;
    }

    BN_clear_free(key->priv_key);
    key->priv_key = BN_dup(prv);
    return (key->priv_key == NULL) ? 0 : 1;
}