Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
OpenSSL::SSL::SSLSocket#client_ca
() -> (::Array[::OpenSSL::X509::Name] | ::Array[::OpenSSL::X509::Certificate] | ::OpenSSL::X509::Certificate)
ssl.client_ca => [x509name, ...] or nil
ext/openssl/ossl_ssl.c
View on GitHub ↗
static VALUE
ossl_ssl_get_client_ca_list(VALUE self)
{
SSL *ssl;
STACK_OF(X509_NAME) *ca;
GetSSL(self, ssl);
ca = SSL_get_client_CA_list(ssl);
if (!ca)
return Qnil;
return ossl_x509name_sk2ary(ca);
}
Returns the list of client CAs. Please note that in contrast to SSLContext#client_ca= no array of X509::Certificate is returned but X509::Name instances of the CA’s subject distinguished name.
In server mode, returns the list set by SSLContext#client_ca=. In client mode, returns the list of client CAs sent from the server.
See also
#cipher
#client_cert_cb
#check_nonblock
#close_read
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0