End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::PKey::EC#private_key
key.private_key => OpenSSL::BN
ext/openssl/ossl_pkey_ec.c
View on GitHub ↗
static VALUE ossl_ec_key_get_private_key(VALUE self)
{
EC_KEY *ec;
const BIGNUM *bn;
GetEC(self, ec);
if ((bn = EC_KEY_get0_private_key(ec)) == NULL)
return Qnil;
return ossl_bn_new(bn);
}
See the OpenSSL documentation for EC_KEY_get0_private_key()
See also
#private_key=
#private_key?
#private?
#initialize_copy
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1