Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
OpenSSL::X509::Certificate#public_key
() -> ::OpenSSL::PKey::PKey
cert.public_key => key
ext/openssl/ossl_x509cert.c
View on GitHub ↗
static VALUE
ossl_x509_get_public_key(VALUE self)
{
X509 *x509;
EVP_PKEY *pkey;
GetX509(self, x509);
if (!(pkey = X509_get_pubkey(x509))) { /* adds an reference */
ossl_raise(eX509CertError, NULL);
}
return ossl_pkey_wrap(pkey);
}
No documentation available