• Home
  • Raw
  • Download

Lines Matching refs:realm

50 				 const char *realm, const char *session_id,
52 static char * db_get_osu_config_val(struct hs20_svc *ctx, const char *realm,
55 const char *realm, int use_dmacc);
59 const char *realm,
64 const char *user, const char *realm, in db_add_session() argument
83 sessionid, user ? user : "", realm ? realm : "", in db_add_session()
101 const char *realm, const char *sessionid, in db_update_session_password() argument
108 pw, sessionid, user, realm); in db_update_session_password()
122 const char *realm, in db_update_session_machine_managed() argument
129 pw_mm ? "1" : "0", sessionid, user, realm); in db_update_session_machine_managed()
143 const char *realm, const char *sessionid, in db_add_session_pps() argument
154 str, sessionid, user, realm); in db_add_session_pps()
270 const char *user, const char *realm, in db_remove_session() argument
275 if (user == NULL || realm == NULL) { in db_remove_session()
281 user, realm, sessionid); in db_remove_session()
295 const char *user, const char *realm, in hs20_eventlog() argument
310 realm = realm_buf; in hs20_eventlog()
318 user, realm, sessionid, notes, in hs20_eventlog()
333 const char *user, const char *realm, in hs20_eventlog_node() argument
343 hs20_eventlog(ctx, user, realm, sessionid, notes, str); in hs20_eventlog_node()
349 const char *realm, const char *name, in db_update_mo_str() argument
353 if (user == NULL || realm == NULL || name == NULL) in db_update_mo_str()
356 name, str, user, realm); in db_update_mo_str()
369 const char *realm, const char *name, xml_node_t *mo) in db_update_mo() argument
377 db_update_mo_str(ctx, user, realm, name, str); in db_update_mo()
389 static void add_text_node_conf(struct hs20_svc *ctx, const char *realm, in add_text_node_conf() argument
394 val = db_get_osu_config_val(ctx, realm, field); in add_text_node_conf()
400 static void add_text_node_conf_corrupt(struct hs20_svc *ctx, const char *realm, in add_text_node_conf_corrupt() argument
406 val = db_get_osu_config_val(ctx, realm, field); in add_text_node_conf_corrupt()
472 const char *realm, const char *field, int dmacc) in db_get_val() argument
479 user, realm); in db_get_val()
493 "value='%s'", user, realm, field, dmacc, data.value); in db_get_val()
500 const char *realm, const char *field, in db_update_val() argument
508 realm); in db_update_val()
520 user, realm, field, val); in db_update_val()
530 const char *realm, const char *session_id, in db_get_session_val() argument
536 if (user == NULL || realm == NULL) { in db_get_session_val()
542 field, user, realm, session_id); in db_get_session_val()
564 const char *realm, const char *pw, int dmacc) in update_password() argument
587 const char *realm, int dmacc) in clear_remediation() argument
684 const char *user, const char *realm, in build_credential_pw() argument
699 add_text_node(ctx, cred, "Realm", realm); in build_credential_pw()
706 const char *user, const char *realm, in build_credential() argument
712 return build_credential_pw(ctx, user, realm, new_pw, 1); in build_credential()
717 const char *user, const char *realm, in build_credential_cert() argument
731 add_text_node(ctx, cred, "Realm", realm); in build_credential_cert()
833 const char *user, const char *realm, in build_sub_rem_resp() argument
844 cert = db_get_val(ctx, user, realm, "cert", dmacc); in build_sub_rem_resp()
856 subrem = db_get_val(ctx, user, realm, "subrem", dmacc); in build_sub_rem_resp()
873 real_user = db_get_val(ctx, user, realm, "identity", in build_sub_rem_resp()
883 pw = db_get_session_val(ctx, user, realm, session_id, in build_sub_rem_resp()
892 realm, new_pw, 0); in build_sub_rem_resp()
896 realm, new_pw, sizeof(new_pw)); in build_sub_rem_resp()
908 realm); in build_sub_rem_resp()
928 hs20_eventlog_node(ctx, user, realm, session_id, in build_sub_rem_resp()
935 db_add_session(ctx, user, realm, session_id, NULL, NULL, in build_sub_rem_resp()
940 db_add_session(ctx, user, realm, session_id, new_pw, NULL, in build_sub_rem_resp()
951 const char *realm, in machine_remediation() argument
954 return build_sub_rem_resp(ctx, user, realm, session_id, 1, dmacc); in machine_remediation()
960 const char *realm, in cert_reenroll() argument
963 db_add_session(ctx, user, realm, session_id, NULL, NULL, in cert_reenroll()
965 return spp_exec_get_certificate(ctx, session_id, user, realm, 0); in cert_reenroll()
970 const char *user, const char *realm, in policy_remediation() argument
978 hs20_eventlog(ctx, user, realm, session_id, in policy_remediation()
981 db_add_session(ctx, user, realm, session_id, NULL, NULL, in policy_remediation()
984 policy = build_policy(ctx, user, realm, dmacc); in policy_remediation()
999 realm); in policy_remediation()
1007 hs20_eventlog_node(ctx, user, realm, session_id, in policy_remediation()
1043 const char *realm, const char *session_id, in user_remediation() argument
1048 hs20_eventlog(ctx, user, realm, session_id, in user_remediation()
1050 val = db_get_osu_config_val(ctx, realm, "remediation_url"); in user_remediation()
1054 db_add_session(ctx, user, realm, session_id, NULL, redirect_uri, in user_remediation()
1064 const char *user, const char *realm, in free_remediation() argument
1070 hs20_eventlog(ctx, user, realm, session_id, in free_remediation()
1072 val = db_get_osu_config_val(ctx, realm, "free_remediation_url"); in free_remediation()
1076 db_add_session(ctx, user, realm, session_id, NULL, redirect_uri, in free_remediation()
1086 const char *user, const char *realm, in no_sub_rem() argument
1091 hs20_eventlog(ctx, user, realm, session_id, in no_sub_rem()
1102 const char *realm, in hs20_subscription_remediation() argument
1111 identity = db_get_val(ctx, user, realm, "identity", dmacc); in hs20_subscription_remediation()
1113 hs20_eventlog(ctx, user, realm, session_id, in hs20_subscription_remediation()
1123 free_account = db_get_osu_config_val(ctx, realm, "free_account"); in hs20_subscription_remediation()
1126 return no_sub_rem(ctx, user, realm, session_id); in hs20_subscription_remediation()
1130 type = db_get_val(ctx, user, realm, "remediation", dmacc); in hs20_subscription_remediation()
1134 val = db_get_val(ctx, user, realm, "shared", dmacc); in hs20_subscription_remediation()
1140 return no_sub_rem(ctx, user, realm, session_id); in hs20_subscription_remediation()
1144 ret = user_remediation(ctx, user, realm, session_id, in hs20_subscription_remediation()
1147 ret = free_remediation(ctx, user, realm, session_id, in hs20_subscription_remediation()
1150 ret = policy_remediation(ctx, user, realm, session_id, dmacc); in hs20_subscription_remediation()
1152 ret = machine_remediation(ctx, user, realm, session_id, dmacc); in hs20_subscription_remediation()
1154 ret = cert_reenroll(ctx, user, realm, session_id); in hs20_subscription_remediation()
1156 ret = no_sub_rem(ctx, user, realm, session_id); in hs20_subscription_remediation()
1176 static void update_policy_update_uri(struct hs20_svc *ctx, const char *realm, in update_policy_update_uri() argument
1186 url = db_get_osu_config_val(ctx, realm, "policy_url"); in update_policy_update_uri()
1195 const char *realm, int use_dmacc) in build_policy() argument
1200 policy_id = db_get_val(ctx, user, realm, "policy", use_dmacc); in build_policy()
1212 update_policy_update_uri(ctx, realm, policy); in build_policy()
1217 pw = db_get_val(ctx, user, realm, "osu_password", use_dmacc); in build_policy()
1234 const char *user, const char *realm, in hs20_policy_update() argument
1244 identity = db_get_val(ctx, user, realm, "identity", dmacc); in hs20_policy_update()
1246 hs20_eventlog(ctx, user, realm, session_id, in hs20_policy_update()
1256 policy = build_policy(ctx, user, realm, dmacc); in hs20_policy_update()
1263 db_add_session(ctx, user, realm, session_id, NULL, NULL, POLICY_UPDATE, in hs20_policy_update()
1274 realm); in hs20_policy_update()
1282 hs20_eventlog_node(ctx, user, realm, session_id, "policy update", in hs20_policy_update()
1375 const char *realm, in hs20_subscription_registration() argument
1384 if (db_add_session(ctx, NULL, realm, session_id, NULL, redirect_uri, in hs20_subscription_registration()
1387 val = db_get_osu_config_val(ctx, realm, "signup_url"); in hs20_subscription_registration()
1408 const char *realm, int dmacc, in hs20_user_input_remediation() argument
1411 return build_sub_rem_resp(ctx, user, realm, session_id, 0, dmacc); in hs20_user_input_remediation()
1415 static char * db_get_osu_config_val(struct hs20_svc *ctx, const char *realm, in db_get_osu_config_val() argument
1422 "field=%Q", realm, field); in db_get_osu_config_val()
1431 realm, sqlite3_errmsg(ctx->db)); in db_get_osu_config_val()
1443 const char *user, const char *realm, in build_pps() argument
1470 add_text_node_conf(ctx, realm, aaa1, "CertURL", in build_pps()
1475 add_text_node_conf_corrupt(ctx, realm, aaa1, in build_pps()
1479 add_text_node_conf(ctx, realm, aaa1, "CertSHA256Fingerprint", in build_pps()
1491 add_text_node_conf(ctx, realm, upd, "URI", "policy_url"); in build_pps()
1493 add_text_node_conf(ctx, realm, trust, "CertURL", in build_pps()
1495 add_text_node_conf_corrupt(ctx, realm, trust, in build_pps()
1505 add_text_node_conf(ctx, realm, upd, "URI", "spp_http_auth_url"); in build_pps()
1507 add_text_node_conf(ctx, realm, trust, "CertURL", "trust_root_cert_url"); in build_pps()
1511 add_text_node_conf_corrupt(ctx, realm, trust, in build_pps()
1515 add_text_node_conf(ctx, realm, trust, "CertSHA256Fingerprint", in build_pps()
1531 add_text_node_conf(ctx, realm, homesp, "FriendlyName", "friendly_name"); in build_pps()
1532 add_text_node_conf(ctx, realm, homesp, "FQDN", "fqdn"); in build_pps()
1564 add_text_node(ctx, cred, "Realm", realm); in build_pps()
1573 const char *realm, in spp_exec_get_certificate() argument
1595 val = db_get_osu_config_val(ctx, realm, "est_url"); in spp_exec_get_certificate()
1613 db_update_session_password(ctx, user, realm, session_id, password); in spp_exec_get_certificate()
1628 char *user, *realm, *pw, *type, *mm, *test; in hs20_user_input_registration() local
1635 realm = db_get_session_val(ctx, NULL, NULL, session_id, "realm"); in hs20_user_input_registration()
1638 if (!user || !realm || !pw) { in hs20_user_input_registration()
1642 free(realm); in hs20_user_input_registration()
1659 hs20_eventlog(ctx, user, realm, session_id, in hs20_user_input_registration()
1661 ret = spp_exec_get_certificate(ctx, session_id, user, realm, 1); in hs20_user_input_registration()
1663 free(realm); in hs20_user_input_registration()
1674 free(realm); in hs20_user_input_registration()
1691 pps = build_pps(ctx, user, realm, pw, in hs20_user_input_registration()
1699 free(realm); in hs20_user_input_registration()
1707 db_update_session_password(ctx, user, realm, session_id, pw); in hs20_user_input_registration()
1708 db_update_session_machine_managed(ctx, user, realm, session_id, in hs20_user_input_registration()
1711 db_add_session_pps(ctx, user, realm, session_id, pps); in hs20_user_input_registration()
1713 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_user_input_registration()
1722 free(realm); in hs20_user_input_registration()
1730 free(realm); in hs20_user_input_registration()
1736 snprintf(buf, sizeof(buf), "./Wi-Fi/%s/PerProviderSubscription", realm); in hs20_user_input_registration()
1737 free(realm); in hs20_user_input_registration()
1747 const char *realm, in hs20_user_input_free_remediation() argument
1757 free_account = db_get_osu_config_val(ctx, realm, "free_account"); in hs20_user_input_free_remediation()
1760 pw = db_get_val(ctx, free_account, realm, "password", 0); in hs20_user_input_free_remediation()
1766 cred = build_credential_pw(ctx, free_account, realm, pw, 1); in hs20_user_input_free_remediation()
1782 realm); in hs20_user_input_free_remediation()
1789 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_user_input_free_remediation()
1799 const char *realm, int dmacc, in hs20_user_input_complete() argument
1805 val = db_get_session_val(ctx, user, realm, session_id, "operation"); in hs20_user_input_complete()
1815 return hs20_user_input_remediation(ctx, user, realm, dmacc, in hs20_user_input_complete()
1820 return hs20_user_input_free_remediation(ctx, user, realm, in hs20_user_input_complete()
1837 char *user, *realm, *cert; in hs20_cert_reenroll_complete() local
1844 realm = db_get_session_val(ctx, NULL, NULL, session_id, "realm"); in hs20_cert_reenroll_complete()
1846 if (!user || !realm || !cert) { in hs20_cert_reenroll_complete()
1850 free(realm); in hs20_cert_reenroll_complete()
1855 cred = build_credential_cert(ctx, user, realm, cert); in hs20_cert_reenroll_complete()
1859 free(realm); in hs20_cert_reenroll_complete()
1870 free(realm); in hs20_cert_reenroll_complete()
1878 realm); in hs20_cert_reenroll_complete()
1884 free(realm); in hs20_cert_reenroll_complete()
1889 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_cert_reenroll_complete()
1894 free(realm); in hs20_cert_reenroll_complete()
1902 const char *realm, int dmacc, in hs20_cert_enroll_completed() argument
1930 const char *realm, int dmacc, in hs20_cert_enroll_failed() argument
1939 val = db_get_session_val(ctx, user, realm, session_id, "operation"); in hs20_cert_enroll_failed()
1962 db_remove_session(ctx, user, realm, session_id); in hs20_cert_enroll_failed()
1970 const char *realm, int dmacc, in hs20_sim_provisioning() argument
2002 policy = db_get_osu_config_val(ctx, realm, "sim_policy"); in hs20_sim_provisioning()
2010 update_policy_update_uri(ctx, realm, policy_node); in hs20_sim_provisioning()
2018 pps = build_pps(ctx, NULL, realm, NULL, NULL, 0, NULL, ctx->imsi, in hs20_sim_provisioning()
2029 db_add_session(ctx, user, realm, session_id, NULL, NULL, in hs20_sim_provisioning()
2036 db_add_session_pps(ctx, user, realm, session_id, pps); in hs20_sim_provisioning()
2038 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_sim_provisioning()
2057 snprintf(buf, sizeof(buf), "./Wi-Fi/%s/PerProviderSubscription", realm); in hs20_sim_provisioning()
2068 const char *realm, in hs20_spp_post_dev_data() argument
2090 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2102 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2117 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2137 hs20_eventlog(ctx, user, realm, session_id, str, NULL); in hs20_spp_post_dev_data()
2143 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2150 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2153 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2163 db_update_mo(ctx, user, realm, "devinfo", devinfo); in hs20_spp_post_dev_data()
2169 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2176 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2179 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2199 hs20_eventlog(ctx, user, realm, session_id, buf, NULL); in hs20_spp_post_dev_data()
2202 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2207 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2212 db_update_mo(ctx, user, realm, "devdetail", devdetail); in hs20_spp_post_dev_data()
2221 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2224 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2233 db_update_mo(ctx, user, realm, "pps", mo); in hs20_spp_post_dev_data()
2234 db_update_val(ctx, user, realm, "fetch_pps", "0", dmacc); in hs20_spp_post_dev_data()
2243 fetch = db_get_val(ctx, user, realm, "fetch_pps", dmacc); in hs20_spp_post_dev_data()
2256 if (db_add_session(ctx, user, realm, session_id, NULL, in hs20_spp_post_dev_data()
2262 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2270 char *val = db_get_session_val(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2293 ret = hs20_subscription_registration(ctx, realm, session_id, in hs20_spp_post_dev_data()
2296 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2302 ret = hs20_subscription_remediation(ctx, user, realm, in hs20_spp_post_dev_data()
2305 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2311 ret = hs20_policy_update(ctx, user, realm, session_id, dmacc); in hs20_spp_post_dev_data()
2312 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2321 ret = hs20_user_input_complete(ctx, user, realm, dmacc, in hs20_spp_post_dev_data()
2323 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2329 ret = hs20_cert_enroll_completed(ctx, user, realm, dmacc, in hs20_spp_post_dev_data()
2331 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2337 ret = hs20_cert_enroll_failed(ctx, user, realm, dmacc, in hs20_spp_post_dev_data()
2339 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2346 ret = hs20_sim_provisioning(ctx, user, realm, dmacc, in hs20_spp_post_dev_data()
2348 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2395 char *user, *realm, *pw, *pw_mm, *pps, *str; in add_subscription() local
2408 realm = db_get_session_val(ctx, NULL, NULL, session_id, "realm"); in add_subscription()
2425 if (!user || !realm || !pw) { in add_subscription()
2431 free_account = db_get_osu_config_val(ctx, realm, "free_account"); in add_subscription()
2435 policy = db_get_osu_config_val(ctx, realm, "sim_policy"); in add_subscription()
2439 user, realm, free_acc); in add_subscription()
2444 user, realm, session_id); in add_subscription()
2456 hs20_eventlog(ctx, user, realm, session_id, in add_subscription()
2470 user, realm, cert ? 0 : 1, in add_subscription()
2494 ret = update_password(ctx, user, realm, pw, 0); in add_subscription()
2497 user, realm); in add_subscription()
2506 db_update_mo_str(ctx, user, realm, "pps", pps); in add_subscription()
2510 db_update_mo_str(ctx, user, realm, "devinfo", str); in add_subscription()
2516 db_update_mo_str(ctx, user, realm, "devdetail", str); in add_subscription()
2531 str ? str : "", user, realm ? realm : "", in add_subscription()
2565 hs20_eventlog(ctx, user, realm, session_id, in add_subscription()
2571 free(realm); in add_subscription()
2588 const char *realm, in hs20_spp_update_response() argument
2622 new_pw = db_get_session_val(ctx, user, realm, in hs20_spp_update_response()
2629 hs20_eventlog_node(ctx, user, realm, in hs20_spp_update_response()
2633 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()
2640 new_pw = db_get_session_val(ctx, user, realm, in hs20_spp_update_response()
2644 db_remove_session(ctx, user, realm, in hs20_spp_update_response()
2651 if (update_password(ctx, user, realm, new_pw, dmacc) < in hs20_spp_update_response()
2658 hs20_eventlog_node(ctx, user, realm, in hs20_spp_update_response()
2661 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()
2664 hs20_eventlog(ctx, user, realm, in hs20_spp_update_response()
2672 if (clear_remediation(ctx, user, realm, dmacc) < 0) { in hs20_spp_update_response()
2679 hs20_eventlog_node(ctx, user, realm, in hs20_spp_update_response()
2683 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()
2686 hs20_eventlog(ctx, user, realm, in hs20_spp_update_response()
2698 hs20_eventlog_node(ctx, user, realm, in hs20_spp_update_response()
2701 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()
2707 val = db_get_val(ctx, user, realm, "remediation", in hs20_spp_update_response()
2710 db_update_val(ctx, user, realm, "remediation", in hs20_spp_update_response()
2715 db_update_val(ctx, user, realm, "polupd_done", "1", in hs20_spp_update_response()
2729 hs20_eventlog_node(ctx, user, realm, in hs20_spp_update_response()
2742 hs20_eventlog(ctx, user, realm, session_id, event, in hs20_spp_update_response()
2745 if (db_update_val(ctx, user, realm, "identity", in hs20_spp_update_response()
2747 db_update_val(ctx, new_user, realm, "remediation", in hs20_spp_update_response()
2754 hs20_eventlog_node(ctx, user, realm, in hs20_spp_update_response()
2768 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_update_response()
2776 hs20_eventlog_node(ctx, user, realm, session_id, "Error occurred", ret); in hs20_spp_update_response()
2777 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()