Lines Matching refs:session_id

50 				 const char *realm, const char *session_id,
57 const char *session_id,
530 const char *realm, const char *session_id, in db_get_session_val() argument
538 "id=%Q", field, session_id); in db_get_session_val()
542 field, user, realm, session_id); in db_get_session_val()
552 session_id, sqlite3_errmsg(ctx->db)); in db_get_session_val()
739 const char *session_id, in build_post_dev_data_response() argument
754 xml_node_add_attr(ctx->xml, spp_node, ns, "sessionID", session_id); in build_post_dev_data_response()
834 const char *session_id, in build_sub_rem_resp() argument
883 pw = db_get_session_val(ctx, user, realm, session_id, in build_sub_rem_resp()
912 spp_node = build_post_dev_data_response(ctx, &ns, session_id, status, 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()
952 const char *session_id, int dmacc) in machine_remediation() argument
954 return build_sub_rem_resp(ctx, user, realm, session_id, 1, dmacc); in machine_remediation()
961 const char *session_id) 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()
971 const char *session_id, int dmacc) 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()
987 ctx, NULL, session_id, in policy_remediation()
992 spp_node = build_post_dev_data_response(ctx, &ns, session_id, status, in policy_remediation()
1007 hs20_eventlog_node(ctx, user, realm, session_id, in policy_remediation()
1016 const char *session_id, in browser_remediation() argument
1030 spp_node = build_post_dev_data_response(ctx, &ns, session_id, "OK", in browser_remediation()
1043 const char *realm, const char *session_id, in user_remediation() argument
1048 hs20_eventlog(ctx, user, realm, session_id, in user_remediation()
1054 db_add_session(ctx, user, realm, session_id, NULL, redirect_uri, in user_remediation()
1057 snprintf(uri, sizeof(uri), "%s%s", val, session_id); in user_remediation()
1059 return browser_remediation(ctx, session_id, redirect_uri, uri); in user_remediation()
1065 const char *session_id, in free_remediation() argument
1070 hs20_eventlog(ctx, user, realm, session_id, in free_remediation()
1076 db_add_session(ctx, user, realm, session_id, NULL, redirect_uri, in free_remediation()
1079 snprintf(uri, sizeof(uri), "%s%s", val, session_id); in free_remediation()
1081 return browser_remediation(ctx, session_id, redirect_uri, uri); in free_remediation()
1087 const char *session_id) in no_sub_rem() argument
1091 hs20_eventlog(ctx, user, realm, session_id, in no_sub_rem()
1095 return build_post_dev_data_response(ctx, NULL, session_id, status, in no_sub_rem()
1103 const char *session_id, in hs20_subscription_remediation() argument
1113 hs20_eventlog(ctx, user, realm, session_id, in hs20_subscription_remediation()
1117 return build_post_dev_data_response(ctx, NULL, session_id, in hs20_subscription_remediation()
1126 return no_sub_rem(ctx, user, realm, session_id); 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()
1235 const char *session_id, int dmacc) in hs20_policy_update() argument
1246 hs20_eventlog(ctx, user, realm, session_id, in hs20_policy_update()
1250 return build_post_dev_data_response(ctx, NULL, session_id, in hs20_policy_update()
1259 ctx, NULL, session_id, in hs20_policy_update()
1263 db_add_session(ctx, user, realm, session_id, NULL, NULL, POLICY_UPDATE, in hs20_policy_update()
1267 spp_node = build_post_dev_data_response(ctx, &ns, session_id, status, in hs20_policy_update()
1282 hs20_eventlog_node(ctx, user, realm, session_id, "policy update", in hs20_policy_update()
1355 const char *session_id, const char *urn) in spp_exec_upload_mo() argument
1360 spp_node = build_post_dev_data_response(ctx, &ns, session_id, "OK", in spp_exec_upload_mo()
1376 const char *session_id, in hs20_subscription_registration() argument
1384 if (db_add_session(ctx, NULL, realm, session_id, NULL, redirect_uri, in hs20_subscription_registration()
1389 hs20_eventlog(ctx, NULL, realm, session_id, in hs20_subscription_registration()
1394 spp_node = build_post_dev_data_response(ctx, &ns, session_id, "OK", in hs20_subscription_registration()
1401 snprintf(uri, sizeof(uri), "%s%s", val, session_id); in hs20_subscription_registration()
1412 const char *session_id) in hs20_user_input_remediation() argument
1414 return build_sub_rem_resp(ctx, user, realm, session_id, 0, dmacc); in hs20_user_input_remediation()
1574 const char *session_id, in spp_exec_get_certificate() argument
1588 spp_node = build_post_dev_data_response(ctx, &ns, session_id, "OK", in spp_exec_get_certificate()
1616 db_update_session_password(ctx, user, realm, session_id, password); in spp_exec_get_certificate()
1623 const char *session_id, in hs20_user_input_registration() argument
1637 user = db_get_session_val(ctx, NULL, NULL, session_id, "user"); in hs20_user_input_registration()
1638 realm = db_get_session_val(ctx, NULL, NULL, session_id, "realm"); in hs20_user_input_registration()
1639 pw = db_get_session_val(ctx, NULL, NULL, session_id, "password"); in hs20_user_input_registration()
1650 mm = db_get_session_val(ctx, NULL, NULL, session_id, "machine_managed"); in hs20_user_input_registration()
1655 type = db_get_session_val(ctx, NULL, NULL, session_id, "type"); in hs20_user_input_registration()
1662 hs20_eventlog(ctx, user, realm, session_id, in hs20_user_input_registration()
1664 ret = spp_exec_get_certificate(ctx, session_id, user, realm, 1); in hs20_user_input_registration()
1684 spp_node = build_post_dev_data_response(ctx, &ns, session_id, status, in hs20_user_input_registration()
1689 fingerprint = db_get_session_val(ctx, NULL, NULL, session_id, "cert"); in hs20_user_input_registration()
1690 test = db_get_session_val(ctx, NULL, NULL, session_id, "test"); in hs20_user_input_registration()
1710 db_update_session_password(ctx, user, realm, session_id, pw); in hs20_user_input_registration()
1711 db_update_session_machine_managed(ctx, user, realm, session_id, in hs20_user_input_registration()
1714 db_add_session_pps(ctx, user, realm, session_id, pps); in hs20_user_input_registration()
1716 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_user_input_registration()
1751 const char *session_id) in hs20_user_input_free_remediation() argument
1778 spp_node = build_post_dev_data_response(ctx, &ns, session_id, status, in hs20_user_input_free_remediation()
1792 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_user_input_free_remediation()
1803 const char *session_id) in hs20_user_input_complete() argument
1808 val = db_get_session_val(ctx, user, realm, session_id, "operation"); in hs20_user_input_complete()
1811 session_id); in hs20_user_input_complete()
1819 session_id); in hs20_user_input_complete()
1824 session_id); in hs20_user_input_complete()
1828 return hs20_user_input_registration(ctx, session_id, 0); in hs20_user_input_complete()
1832 "completion", session_id); in hs20_user_input_complete()
1838 const char *session_id) in hs20_cert_reenroll_complete() argument
1846 user = db_get_session_val(ctx, NULL, NULL, session_id, "user"); in hs20_cert_reenroll_complete()
1847 realm = db_get_session_val(ctx, NULL, NULL, session_id, "realm"); in hs20_cert_reenroll_complete()
1848 cert = db_get_session_val(ctx, NULL, NULL, session_id, "cert"); in hs20_cert_reenroll_complete()
1868 spp_node = build_post_dev_data_response(ctx, &ns, session_id, status, in hs20_cert_reenroll_complete()
1892 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_cert_reenroll_complete()
1906 const char *session_id) in hs20_cert_enroll_completed() argument
1911 val = db_get_session_val(ctx, NULL, NULL, session_id, "operation"); in hs20_cert_enroll_completed()
1914 session_id); in hs20_cert_enroll_completed()
1921 return hs20_user_input_registration(ctx, session_id, 1); in hs20_cert_enroll_completed()
1923 return hs20_cert_reenroll_complete(ctx, session_id); in hs20_cert_enroll_completed()
1926 "enrollment completion", session_id); in hs20_cert_enroll_completed()
1934 const char *session_id) in hs20_cert_enroll_failed() argument
1942 val = db_get_session_val(ctx, user, realm, session_id, "operation"); in hs20_cert_enroll_failed()
1945 session_id); in hs20_cert_enroll_failed()
1953 "enrollment failure", session_id); in hs20_cert_enroll_failed()
1958 spp_node = build_post_dev_data_response(ctx, &ns, session_id, status, in hs20_cert_enroll_failed()
1965 db_remove_session(ctx, user, realm, session_id); in hs20_cert_enroll_failed()
1974 const char *session_id) in hs20_sim_provisioning() argument
2000 spp_node = build_post_dev_data_response(ctx, &ns, session_id, status, in hs20_sim_provisioning()
2032 db_add_session(ctx, user, realm, session_id, NULL, NULL, in hs20_sim_provisioning()
2034 db_add_session_dmacc(ctx, session_id, dmacc_username, dmacc_password); in hs20_sim_provisioning()
2036 db_add_session_eap_method(ctx, session_id, ctx->eap_method); in hs20_sim_provisioning()
2038 db_add_session_id_hash(ctx, session_id, ctx->id_hash); in hs20_sim_provisioning()
2039 db_add_session_pps(ctx, user, realm, session_id, pps); in hs20_sim_provisioning()
2041 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_sim_provisioning()
2072 const char *session_id, in hs20_spp_post_dev_data() argument
2091 ctx, NULL, session_id, "Error occurred", in hs20_spp_post_dev_data()
2093 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2103 ctx, NULL, session_id, "Error occurred", in hs20_spp_post_dev_data()
2105 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2118 ctx, NULL, session_id, "Error occurred", in hs20_spp_post_dev_data()
2120 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2137 req_reason, session_id, redirect_uri); in hs20_spp_post_dev_data()
2140 hs20_eventlog(ctx, user, realm, session_id, str, NULL); in hs20_spp_post_dev_data()
2144 ret = build_post_dev_data_response(ctx, NULL, session_id, in hs20_spp_post_dev_data()
2146 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2153 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2156 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2159 ret = build_post_dev_data_response(ctx, NULL, session_id, in hs20_spp_post_dev_data()
2170 ret = build_post_dev_data_response(ctx, NULL, session_id, in hs20_spp_post_dev_data()
2172 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2179 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2182 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2185 ret = build_post_dev_data_response(ctx, NULL, session_id, in hs20_spp_post_dev_data()
2202 hs20_eventlog(ctx, user, realm, session_id, buf, NULL); in hs20_spp_post_dev_data()
2205 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2210 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2224 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2227 hs20_eventlog(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2233 ctx, NULL, session_id, in hs20_spp_post_dev_data()
2259 if (db_add_session(ctx, user, realm, session_id, NULL, in hs20_spp_post_dev_data()
2263 ret = spp_exec_upload_mo(ctx, session_id, in hs20_spp_post_dev_data()
2265 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2273 char *val = db_get_session_val(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2278 session_id); in hs20_spp_post_dev_data()
2290 session_id); in hs20_spp_post_dev_data()
2296 ret = hs20_subscription_registration(ctx, realm, session_id, in hs20_spp_post_dev_data()
2299 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2306 session_id, dmacc, in hs20_spp_post_dev_data()
2308 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2314 ret = hs20_policy_update(ctx, user, realm, session_id, dmacc); in hs20_spp_post_dev_data()
2315 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2322 db_add_session_devinfo(ctx, session_id, devinfo); in hs20_spp_post_dev_data()
2323 db_add_session_devdetail(ctx, session_id, devdetail); in hs20_spp_post_dev_data()
2325 session_id); in hs20_spp_post_dev_data()
2326 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2333 session_id); in hs20_spp_post_dev_data()
2334 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2341 session_id); in hs20_spp_post_dev_data()
2342 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2350 session_id); in hs20_spp_post_dev_data()
2351 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_post_dev_data()
2371 const char *session_id, in build_spp_exchange_complete() argument
2383 xml_node_add_attr(ctx->xml, spp_node, ns, "sessionID", session_id); in build_spp_exchange_complete()
2396 static int add_subscription(struct hs20_svc *ctx, const char *session_id) in add_subscription() argument
2410 user = db_get_session_val(ctx, NULL, NULL, session_id, "user"); in add_subscription()
2411 realm = db_get_session_val(ctx, NULL, NULL, session_id, "realm"); in add_subscription()
2412 pw = db_get_session_val(ctx, NULL, NULL, session_id, "password"); in add_subscription()
2413 pw_mm = db_get_session_val(ctx, NULL, NULL, session_id, in add_subscription()
2415 pps = db_get_session_val(ctx, NULL, NULL, session_id, "pps"); in add_subscription()
2416 cert_pem = db_get_session_val(ctx, NULL, NULL, session_id, "cert_pem"); in add_subscription()
2417 fingerprint = db_get_session_val(ctx, NULL, NULL, session_id, "cert"); in add_subscription()
2418 type = db_get_session_val(ctx, NULL, NULL, session_id, "type"); in add_subscription()
2422 osu_user = db_get_session_val(ctx, NULL, NULL, session_id, "osu_user"); in add_subscription()
2423 osu_password = db_get_session_val(ctx, NULL, NULL, session_id, in add_subscription()
2425 eap_method = db_get_session_val(ctx, NULL, NULL, session_id, in add_subscription()
2447 user, realm, session_id); in add_subscription()
2459 hs20_eventlog(ctx, user, realm, session_id, in add_subscription()
2466 str = db_get_session_val(ctx, NULL, NULL, session_id, "mac_addr"); in add_subscription()
2511 str = db_get_session_val(ctx, NULL, NULL, session_id, "devinfo"); in add_subscription()
2517 str = db_get_session_val(ctx, NULL, NULL, session_id, "devdetail"); in add_subscription()
2526 str = db_get_session_val(ctx, NULL, NULL, session_id, in add_subscription()
2549 str = db_get_session_val(ctx, NULL, NULL, session_id, in add_subscription()
2568 hs20_eventlog(ctx, user, realm, session_id, in add_subscription()
2592 const char *session_id, in hs20_spp_update_response() argument
2608 status, session_id); in hs20_spp_update_response()
2610 val = db_get_session_val(ctx, NULL, NULL, session_id, "operation"); in hs20_spp_update_response()
2614 session_id); in hs20_spp_update_response()
2626 session_id, "password"); in hs20_spp_update_response()
2630 ctx, session_id, "Error occurred", in hs20_spp_update_response()
2633 session_id, "No password " in hs20_spp_update_response()
2636 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()
2644 session_id, in hs20_spp_update_response()
2648 session_id); in hs20_spp_update_response()
2659 ctx, session_id, "Error occurred", in hs20_spp_update_response()
2662 session_id, "Failed to " in hs20_spp_update_response()
2664 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()
2668 session_id, "Updated user password " in hs20_spp_update_response()
2680 ctx, session_id, "Error occurred", in hs20_spp_update_response()
2683 session_id, in hs20_spp_update_response()
2686 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()
2690 session_id, in hs20_spp_update_response()
2695 if (add_subscription(ctx, session_id) < 0) { in hs20_spp_update_response()
2699 ctx, session_id, "Error occurred", in hs20_spp_update_response()
2702 session_id, "Failed to " in hs20_spp_update_response()
2704 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()
2725 session_id, "user"); in hs20_spp_update_response()
2730 ctx, session_id, "Error occurred", in hs20_spp_update_response()
2733 session_id, in hs20_spp_update_response()
2736 db_remove_session(ctx, NULL, NULL, session_id); in hs20_spp_update_response()
2745 hs20_eventlog(ctx, user, realm, session_id, event, in hs20_spp_update_response()
2755 ctx, session_id, "Error occurred", in hs20_spp_update_response()
2758 session_id, in hs20_spp_update_response()
2761 db_remove_session(ctx, NULL, NULL, session_id); in hs20_spp_update_response()
2769 ctx, session_id, in hs20_spp_update_response()
2771 hs20_eventlog_node(ctx, user, realm, session_id, in hs20_spp_update_response()
2773 db_remove_session(ctx, NULL, NULL, session_id); in hs20_spp_update_response()
2777 ret = build_spp_exchange_complete(ctx, session_id, "Error occurred", in hs20_spp_update_response()
2779 hs20_eventlog_node(ctx, user, realm, session_id, "Error occurred", ret); in hs20_spp_update_response()
2780 db_remove_session(ctx, user, realm, session_id); in hs20_spp_update_response()
2815 char *session_id; in hs20_spp_server_process() local
2840 session_id = xml_node_get_attr_value_ns(ctx->xml, node, in hs20_spp_server_process()
2846 hs20_eventlog_node(ctx, auth_user, auth_realm, session_id, in hs20_spp_server_process()
2848 hs20_eventlog(ctx, auth_user, auth_realm, session_id, in hs20_spp_server_process()
2851 xml_node_get_attr_value_free(ctx->xml, session_id); in hs20_spp_server_process()
2858 session_id = xml_node_get_attr_value_ns(ctx->xml, node, SPP_NS_URI, in hs20_spp_server_process()
2860 if (session_id) { in hs20_spp_server_process()
2862 debug_print(ctx, 1, "Received sessionID %s", session_id); in hs20_spp_server_process()
2863 tmp = os_strdup(session_id); in hs20_spp_server_process()
2864 xml_node_get_attr_value_free(ctx->xml, session_id); in hs20_spp_server_process()
2867 session_id = tmp; in hs20_spp_server_process()
2869 session_id = gen_spp_session_id(); in hs20_spp_server_process()
2870 if (session_id == NULL) { in hs20_spp_server_process()
2874 debug_print(ctx, 1, "Generated sessionID %s", session_id); in hs20_spp_server_process()
2884 hs20_eventlog_node(ctx, auth_user, auth_realm, session_id, in hs20_spp_server_process()
2888 session_id, dmacc); in hs20_spp_server_process()
2890 hs20_eventlog_node(ctx, auth_user, auth_realm, session_id, in hs20_spp_server_process()
2894 auth_realm, session_id, dmacc); in hs20_spp_server_process()
2896 hs20_eventlog_node(ctx, auth_user, auth_realm, session_id, in hs20_spp_server_process()
2904 os_free(session_id); in hs20_spp_server_process()