Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
OpenSSL::X509::Certificate#extensions
() -> ::Array[::OpenSSL::X509::Extension]
cert.extensions => [extension...]
ext/openssl/ossl_x509cert.c
View on GitHub ↗
static VALUE
ossl_x509_get_extensions(VALUE self)
{
X509 *x509;
int count, i;
X509_EXTENSION *ext;
VALUE ary;
GetX509(self, x509);
count = X509_get_ext_count(x509);
if (count < 0) {
return rb_ary_new();
}
ary = rb_ary_new2(count);
for (i=0; i<count; i++) {
ext = X509_get_ext(x509, i); /* NO DUP - don't free! */
rb_ary_push(ary, ossl_x509ext_new(ext));
}
return ary;
}
No documentation available
See also
#extensions=
#check_private_key
#add_extension
#initialize_copy
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0