End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::PKey::EC#private?
key.private? => true or false
ext/openssl/ossl_pkey_ec.c
View on GitHub ↗
static VALUE ossl_ec_key_is_private(VALUE self)
{
EC_KEY *ec;
GetEC(self, ec);
return EC_KEY_get0_private_key(ec) ? Qtrue : Qfalse;
}
Returns whether this EC instance has a private key. The private key (BN) can be retrieved with EC#private_key.
See also
#initialize_copy
#private_key
#group=
#private_key=
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0