Method: OpenSSL::SSL::SSLSocket#client_ca

Defined in:
ext/rubysl/openssl/ossl_ssl.c

#client_caArray

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.

Returns:

  • (Array)


2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
# File 'ext/rubysl/openssl/ossl_ssl.c', line 2157

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);
    return ossl_x509name_sk2ary(ca);
}