Skip to content

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

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.