SSL_CTX_set_client_CA_list(3) OpenSSL SSL_CTX_set_client_CA_list(3) NNAAMMEE SSL_CTX_set_client_CA_list, SSL_set_client_CA_list, SSL_CTX_add_client_CA, SSL_add_client_CA - set list of CAs sent to the client when requesting a client certificate SSYYNNOOPPSSIISS #include void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *list); void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *list); int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *cacert); int SSL_add_client_CA(SSL *ssl, X509 *cacert); DDEESSCCRRIIPPTTIIOONN _S_S_L___C_T_X___s_e_t___c_l_i_e_n_t___C_A___l_i_s_t_(_) sets the lliisstt of CAs sent to the client when requesting a client certificate for ccttxx. _S_S_L___s_e_t___c_l_i_e_n_t___C_A___l_i_s_t_(_) sets the lliisstt of CAs sent to the client when requesting a client certificate for the chosen ssssll, overriding the set- ting valid for ssssll's SSL_CTX object. _S_S_L___C_T_X___a_d_d___c_l_i_e_n_t___C_A_(_) adds the CA name extracted from ccaacceerrtt to the list of CAs sent to the client when requesting a client certificate for ccttxx. _S_S_L___a_d_d___c_l_i_e_n_t___C_A_(_) adds the CA name extracted from ccaacceerrtt to the list of CAs sent to the client when requesting a client certificate for the chosen ssssll, overriding the setting valid for ssssll's SSL_CTX object. NNOOTTEESS When a TLS/SSL server requests a client certificate (see _SS_SS_LL____CC_TT_XX____ss_ee_tt____vv_ee_rr_ii_ff_yy((33))), it sends a list of CAs, for which it will accept certificates, to the client. This list must explicitly be set using _S_S_L___C_T_X___s_e_t___c_l_i_e_n_t___C_A___l_i_s_t_(_) for ccttxx and _S_S_L___s_e_t___c_l_i_e_n_t___C_A___l_i_s_t_(_) for the specific ssssll. The list speci- fied overrides the previous setting. The CAs listed do not become trusted (lliisstt only contains the names, not the complete certificates); use _S_S_L___C_T_X___l_o_a_d___v_e_r_i_f_y___l_o_c_a_t_i_o_n_s(3) to additionally load them for ver- ification. If the list of acceptable CAs is compiled in a file, the _S_S_L___l_o_a_d___c_l_i_e_n_t___C_A___f_i_l_e(3) function can be used to help importing the necessary data. _S_S_L___C_T_X___a_d_d___c_l_i_e_n_t___C_A_(_) and _S_S_L___a_d_d___c_l_i_e_n_t___C_A_(_) can be used to add additional items the list of client CAs. If no list was specified before using _S_S_L___C_T_X___s_e_t___c_l_i_e_n_t___C_A___l_i_s_t_(_) or _S_S_L___s_e_t___c_l_i_e_n_t___C_A___l_i_s_t_(_), a new client CA list for ccttxx or ssssll (as appropriate) is opened. These functions are only useful for TLS/SSL servers. RREETTUURRNN VVAALLUUEESS _S_S_L___C_T_X___s_e_t___c_l_i_e_n_t___C_A___l_i_s_t_(_) and _S_S_L___s_e_t___c_l_i_e_n_t___C_A___l_i_s_t_(_) do not return diagnostic information. _S_S_L___C_T_X___a_d_d___c_l_i_e_n_t___C_A_(_) and _S_S_L___a_d_d___c_l_i_e_n_t___C_A_(_) have the following return values: 0 A failure while manipulating the STACK_OF(X509_NAME) object occurred or the X509_NAME could not be extracted from ccaacceerrtt. Check the error stack to find out the reason. 1 The operation succeeded. EEXXAAMMPPLLEESS Scan all certificates in CCAAffiillee and list them as acceptable CAs: SSL_CTX_set_client_CA_list(ctx,SSL_load_client_CA_file(CAfile)); SSEEEE AALLSSOO _s_s_l(3), _S_S_L___g_e_t___c_l_i_e_n_t___C_A___l_i_s_t(3), _S_S_L___l_o_a_d___c_l_i_e_n_t___C_A___f_i_l_e(3), _S_S_L___C_T_X___l_o_a_d___v_e_r_i_f_y___l_o_c_a_t_i_o_n_s(3) 1.0.1u 2016-09-22 SSL_CTX_set_client_CA_list(3)