Lines Matching defs:fqdn
81 static int valid_fqdn(const char *fqdn)
86 if (strchr(fqdn, '.') == 0 || strlen(fqdn) > 255)
88 for (pos = fqdn; *pos; pos++) {
183 const char *fqdn)
191 wpa_printf(MSG_INFO, "PPS for certificate credential - fqdn=%s", fqdn);
226 os_snprintf(buf, sizeof(buf), "SP/%s/client-ca.pem", fqdn);
234 os_snprintf(buf, sizeof(buf), "SP/%s/client-cert.pem", fqdn);
251 os_snprintf(buf, sizeof(buf), "SP/%s/client-key.pem", fqdn);
479 const char *fqdn)
484 match_len = os_strlen(fqdn);
496 if (os_strncasecmp(val + len - match_len, fqdn, match_len) != 0)
517 char *fqdn, *pos;
530 fqdn = strdup(uri + 8);
531 if (fqdn == NULL)
533 pos = strchr(fqdn, '/');
544 wpa_printf(MSG_INFO, "SP FQDN: %s", fqdn);
546 if (!server_dnsname_suffix_match(ctx, fqdn)) {
547 wpa_printf(MSG_INFO, "FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values",
548 fqdn);
549 write_result(ctx, "FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values",
550 fqdn);
551 free(fqdn);
555 if (!valid_fqdn(fqdn)) {
556 wpa_printf(MSG_INFO, "Invalid FQDN '%s'", fqdn);
557 write_result(ctx, "Invalid FQDN '%s'", fqdn);
558 free(fqdn);
563 snprintf(fname, fname_len, "SP/%s", fqdn);
569 free(fqdn);
574 snprintf(fname, fname_len, "SP/%s/pps.xml", fqdn);
581 free(fqdn);
589 free(fqdn);
598 free(fqdn);
605 free(fqdn);
615 free(fqdn);
622 if (cert && process_est_cert(ctx, cert, fqdn) < 0) {
624 free(fqdn);
627 free(fqdn);
663 process_est_cert(ctx, cert, ctx->fqdn) < 0) {
727 /* Remove old credentials based on HomeSP/FQDN */
728 static void remove_sp_creds(struct hs20_osu_client *ctx, const char *fqdn)
731 os_snprintf(cmd, sizeof(cmd), "REMOVE_CRED provisioning_sp=%s", fqdn);
1139 wpa_printf(MSG_INFO, "- HomeSP/FQDN = %s", str);
1218 char *fqdn = NULL;
1223 if (os_strcasecmp(name, "FQDN") == 0 && !fqdn) {
1224 fqdn = xml_node_get_text(ctx->xml, child);
1225 wpa_printf(MSG_INFO, "- HomeSP/OtherHomePartners/<X+>/FQDN = %s",
1226 fqdn);
1232 if (fqdn == NULL) {
1233 wpa_printf(MSG_INFO, "- HomeSP/OtherHomePartners/<X+> without FQDN ignored");
1237 if (set_cred_quoted(ctx->ifname, id, "domain", fqdn) < 0)
1240 xml_node_get_text_free(ctx->xml, fqdn);
1288 else if (os_strcasecmp(name, "FQDN") == 0)
1457 xml_node_t *node, const char *fqdn)
1471 snprintf(buf, sizeof(buf), "%s/SP/%s/client-cert.pem", dir, fqdn);
1478 snprintf(buf, sizeof(buf), "%s/SP/%s/client-key.pem", dir, fqdn);
1488 xml_node_t *node, const char *fqdn, int sim)
1506 snprintf(buf, sizeof(buf), "%s/SP/%s/aaa-ca.pem", dir, fqdn);
1622 xml_node_t *node, const char *fqdn)
1642 set_pps_cred_digital_cert(ctx, id, child, fqdn);
1644 set_pps_cred_realm(ctx, id, child, fqdn, sim != NULL);
1657 xml_node_t *cred, const char *fqdn)
1678 set_pps_cred_credential(ctx, id, child, fqdn);
1687 const char *fqdn)
1699 remove_sp_creds(ctx, fqdn);
1730 if (set_cred_quoted(ctx->ifname, id, "provisioning_sp", fqdn) <
1734 set_pps_credential(ctx, id, child, fqdn);
1745 const char *fqdn;
1754 fqdn = os_strstr(pps_fname, "SP/");
1755 if (fqdn) {
1756 fqdn_buf = os_strdup(fqdn + 3);
1762 fqdn = fqdn_buf;
1764 fqdn = "wi-fi.org";
1766 wpa_printf(MSG_INFO, "Set PPS MO info to wpa_supplicant - SP FQDN %s",
1767 fqdn);
1768 set_pps(ctx, pps, fqdn);
1778 char *fqdn = NULL;
1786 node = get_child_node(ctx->xml, pps, "HomeSP/FQDN");
1788 fqdn = xml_node_get_text(ctx->xml, node);
1792 if (fqdn) {
1793 FILE *f = fopen("pps-fqdn", "w");
1795 fprintf(f, "%s", fqdn);
1798 xml_node_get_text_free(ctx->xml, fqdn);
1802 xml_node_get_text_free(ctx->xml, fqdn);
2367 if (os_strncmp(address, "fqdn=", 5) == 0) {
2368 wpa_printf(MSG_INFO, "Use requested FQDN from command line");
2373 wpa_printf(MSG_INFO, "Could not get provisioning Home SP FQDN from wpa_supplicant");
2376 os_free(ctx->fqdn);
2377 ctx->fqdn = os_strdup(buf);
2378 if (ctx->fqdn == NULL)
2380 wpa_printf(MSG_INFO, "Home SP FQDN for current credential: %s",
2383 "SP/%s/pps.xml", ctx->fqdn);
2387 ctx->fqdn);
2412 if (!ctx->fqdn) {
2414 node = get_child_node(ctx->xml, pps, "HomeSP/FQDN");
2416 wpa_printf(MSG_INFO, "No HomeSP/FQDN found from PPS");
2421 wpa_printf(MSG_INFO, "No HomeSP/FQDN text found from PPS");
2424 ctx->fqdn = os_strdup(tmp);
2426 if (!ctx->fqdn) {
2427 wpa_printf(MSG_INFO, "No FQDN known");
2457 "SP/%s/client-cert.pem", ctx->fqdn);
2460 "SP/%s/client-key.pem", ctx->fqdn);
2524 if (os_strncmp(address, "fqdn=", 5) == 0) {
2525 wpa_printf(MSG_INFO, "Use requested FQDN from command line");
2530 wpa_printf(MSG_INFO, "Could not get provisioning Home SP FQDN from wpa_supplicant");
2533 os_free(ctx->fqdn);
2534 ctx->fqdn = os_strdup(buf);
2535 if (ctx->fqdn == NULL)
2537 wpa_printf(MSG_INFO, "Home SP FQDN for current credential: %s",
2540 "SP/%s/pps.xml", ctx->fqdn);
2569 if (!ctx->fqdn) {
2571 node = get_child_node(ctx->xml, pps, "HomeSP/FQDN");
2573 wpa_printf(MSG_INFO, "No HomeSP/FQDN found from PPS");
2578 wpa_printf(MSG_INFO, "No HomeSP/FQDN text found from PPS");
2581 ctx->fqdn = os_strdup(tmp);
2583 if (!ctx->fqdn) {
2584 wpa_printf(MSG_INFO, "No FQDN known");
2614 "SP/%s/client-cert.pem", ctx->fqdn);
2617 "SP/%s/client-key.pem", ctx->fqdn);
2895 os_free(ctx->fqdn);