Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
OpenSSL::PKey::PKey#initialize_copy
(self object) -> self
initialize_copy(p1)
ext/openssl/ossl_pkey.c
View on GitHub ↗
HAVE_EVP_PKEY_DUP
static VALUE
ossl_pkey_initialize_copy(VALUE self, VALUE other)
{
EVP_PKEY *pkey, *pkey_other;
TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
TypedData_Get_Struct(other, EVP_PKEY, &ossl_evp_pkey_type, pkey_other);
if (pkey)
rb_raise(rb_eTypeError, "pkey already initialized");
if (pkey_other) {
pkey = EVP_PKEY_dup(pkey_other);
if (!pkey)
ossl_raise(ePKeyError, "EVP_PKEY_dup");
RTYPEDDATA_DATA(self) = pkey;
}
return self;
}
No documentation available