Home | History | Annotate | Download | only in ap

Lines Matching defs:hapd

29 static int hostapd_sim_db_cb_sta(struct hostapd_data *hapd,
40 struct hostapd_data *hapd = ctx;
41 if (ap_for_each_sta(hapd, hostapd_sim_db_cb_sta, session_ctx) == 0) {
43 radius_server_eap_pending_cb(hapd->radius_srv, session_ctx);
88 static int hostapd_setup_radius_srv(struct hostapd_data *hapd)
91 struct hostapd_bss_config *conf = hapd->conf;
95 srv.conf_ctx = hapd;
96 srv.eap_sim_db_priv = hapd->eap_sim_db_priv;
97 srv.ssl_ctx = hapd->ssl_ctx;
98 srv.msg_ctx = hapd->msg_ctx;
108 srv.wps = hapd->wps;
119 hapd->radius_srv = radius_server_init(&srv);
120 if (hapd->radius_srv == NULL) {
131 int authsrv_init(struct hostapd_data *hapd)
134 if (hapd->conf->eap_server &&
135 (hapd->conf->ca_cert || hapd->conf->server_cert ||
136 hapd->conf->dh_file)) {
139 hapd->ssl_ctx = tls_init(NULL);
140 if (hapd->ssl_ctx == NULL) {
142 authsrv_deinit(hapd);
147 params.ca_cert = hapd->conf->ca_cert;
148 params.client_cert = hapd->conf->server_cert;
149 params.private_key = hapd->conf->private_key;
150 params.private_key_passwd = hapd->conf->private_key_passwd;
151 params.dh_file = hapd->conf->dh_file;
153 hapd->conf->ocsp_stapling_response;
155 if (tls_global_set_params(hapd->ssl_ctx, &params)) {
157 authsrv_deinit(hapd);
161 if (tls_global_set_verify(hapd->ssl_ctx,
162 hapd->conf->check_crl)) {
164 authsrv_deinit(hapd);
171 if (hapd->conf->eap_sim_db) {
172 hapd->eap_sim_db_priv =
173 eap_sim_db_init(hapd->conf->eap_sim_db,
174 hostapd_sim_db_cb, hapd);
175 if (hapd->eap_sim_db_priv == NULL) {
178 authsrv_deinit(hapd);
185 if (hapd->conf->radius_server_clients &&
186 hostapd_setup_radius_srv(hapd))
194 void authsrv_deinit(struct hostapd_data *hapd)
197 radius_server_deinit(hapd->radius_srv);
198 hapd->radius_srv = NULL;
202 if (hapd->ssl_ctx) {
203 tls_deinit(hapd->ssl_ctx);
204 hapd->ssl_ctx = NULL;
209 if (hapd->eap_sim_db_priv) {
210 eap_sim_db_deinit(hapd->eap_sim_db_priv);
211 hapd->eap_sim_db_priv = NULL;