• Home
  • Raw
  • Download

Lines Matching refs:hapd

29 static int hostapd_sim_db_cb_sta(struct hostapd_data *hapd,  in hostapd_sim_db_cb_sta()  argument
40 struct hostapd_data *hapd = ctx; in hostapd_sim_db_cb() local
41 if (ap_for_each_sta(hapd, hostapd_sim_db_cb_sta, session_ctx) == 0) { in hostapd_sim_db_cb()
43 radius_server_eap_pending_cb(hapd->radius_srv, session_ctx); in hostapd_sim_db_cb()
104 static int hostapd_setup_radius_srv(struct hostapd_data *hapd) in hostapd_setup_radius_srv() argument
107 struct hostapd_bss_config *conf = hapd->conf; in hostapd_setup_radius_srv()
112 srv.conf_ctx = hapd; in hostapd_setup_radius_srv()
113 srv.eap_sim_db_priv = hapd->eap_sim_db_priv; in hostapd_setup_radius_srv()
114 srv.ssl_ctx = hapd->ssl_ctx; in hostapd_setup_radius_srv()
115 srv.msg_ctx = hapd->msg_ctx; in hostapd_setup_radius_srv()
125 srv.wps = hapd->wps; in hostapd_setup_radius_srv()
147 hapd->radius_srv = radius_server_init(&srv); in hostapd_setup_radius_srv()
148 if (hapd->radius_srv == NULL) { in hostapd_setup_radius_srv()
193 int authsrv_init(struct hostapd_data *hapd) in authsrv_init() argument
196 if (hapd->conf->eap_server && in authsrv_init()
197 (hapd->conf->ca_cert || hapd->conf->server_cert || in authsrv_init()
198 hapd->conf->private_key || hapd->conf->dh_file)) { in authsrv_init()
203 conf.tls_session_lifetime = hapd->conf->tls_session_lifetime; in authsrv_init()
204 if (hapd->conf->crl_reload_interval > 0 && in authsrv_init()
205 hapd->conf->check_crl <= 0) { in authsrv_init()
208 } else if (hapd->conf->crl_reload_interval > 0) { in authsrv_init()
210 hapd->conf->crl_reload_interval; in authsrv_init()
214 conf.tls_flags = hapd->conf->tls_flags; in authsrv_init()
216 conf.cb_ctx = hapd; in authsrv_init()
217 hapd->ssl_ctx = tls_init(&conf); in authsrv_init()
218 if (hapd->ssl_ctx == NULL) { in authsrv_init()
220 authsrv_deinit(hapd); in authsrv_init()
225 params.ca_cert = hapd->conf->ca_cert; in authsrv_init()
226 params.client_cert = hapd->conf->server_cert; in authsrv_init()
227 params.private_key = hapd->conf->private_key; in authsrv_init()
228 params.private_key_passwd = hapd->conf->private_key_passwd; in authsrv_init()
229 params.dh_file = hapd->conf->dh_file; in authsrv_init()
230 params.openssl_ciphers = hapd->conf->openssl_ciphers; in authsrv_init()
231 params.openssl_ecdh_curves = hapd->conf->openssl_ecdh_curves; in authsrv_init()
233 hapd->conf->ocsp_stapling_response; in authsrv_init()
235 hapd->conf->ocsp_stapling_response_multi; in authsrv_init()
236 params.check_cert_subject = hapd->conf->check_cert_subject; in authsrv_init()
238 if (tls_global_set_params(hapd->ssl_ctx, &params)) { in authsrv_init()
240 authsrv_deinit(hapd); in authsrv_init()
244 if (tls_global_set_verify(hapd->ssl_ctx, in authsrv_init()
245 hapd->conf->check_crl, in authsrv_init()
246 hapd->conf->check_crl_strict)) { in authsrv_init()
248 authsrv_deinit(hapd); in authsrv_init()
255 if (hapd->conf->eap_sim_db) { in authsrv_init()
256 hapd->eap_sim_db_priv = in authsrv_init()
257 eap_sim_db_init(hapd->conf->eap_sim_db, in authsrv_init()
258 hapd->conf->eap_sim_db_timeout, in authsrv_init()
259 hostapd_sim_db_cb, hapd); in authsrv_init()
260 if (hapd->eap_sim_db_priv == NULL) { in authsrv_init()
263 authsrv_deinit(hapd); in authsrv_init()
270 if (hapd->conf->radius_server_clients && in authsrv_init()
271 hostapd_setup_radius_srv(hapd)) in authsrv_init()
279 void authsrv_deinit(struct hostapd_data *hapd) in authsrv_deinit() argument
282 radius_server_deinit(hapd->radius_srv); in authsrv_deinit()
283 hapd->radius_srv = NULL; in authsrv_deinit()
287 if (hapd->ssl_ctx) { in authsrv_deinit()
288 tls_deinit(hapd->ssl_ctx); in authsrv_deinit()
289 hapd->ssl_ctx = NULL; in authsrv_deinit()
294 if (hapd->eap_sim_db_priv) { in authsrv_deinit()
295 eap_sim_db_deinit(hapd->eap_sim_db_priv); in authsrv_deinit()
296 hapd->eap_sim_db_priv = NULL; in authsrv_deinit()