Lines Matching full:fqdn
86 static int valid_fqdn(const char *fqdn)
91 if (strchr(fqdn, '.') == 0 || strlen(fqdn) > 255)
93 for (pos = fqdn; *pos; pos++) {
188 const char *fqdn)
196 wpa_printf(MSG_INFO, "PPS for certificate credential - fqdn=%s", fqdn);
231 os_snprintf(buf, sizeof(buf), "SP/%s/client-ca.pem", fqdn);
239 os_snprintf(buf, sizeof(buf), "SP/%s/client-cert.pem", fqdn);
256 os_snprintf(buf, sizeof(buf), "SP/%s/client-key.pem", fqdn);
484 const char *fqdn)
489 match_len = os_strlen(fqdn);
501 if (os_strncasecmp(val + len - match_len, fqdn, match_len) != 0)
522 char *fqdn, *pos;
535 fqdn = strdup(uri + 8);
536 if (fqdn == NULL)
538 pos = strchr(fqdn, '/');
545 free(fqdn);
550 wpa_printf(MSG_INFO, "SP FQDN: %s", fqdn);
552 if (!server_dnsname_suffix_match(ctx, fqdn)) {
554 "FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values, count: %d",
555 fqdn, (int) ctx->server_dnsname_count);
556 write_result(ctx, "FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values",
557 fqdn);
558 free(fqdn);
562 if (!valid_fqdn(fqdn)) {
563 wpa_printf(MSG_INFO, "Invalid FQDN '%s'", fqdn);
564 write_result(ctx, "Invalid FQDN '%s'", fqdn);
565 free(fqdn);
570 snprintf(fname, fname_len, "SP/%s", fqdn);
576 free(fqdn);
583 * to read files from SP/<fqdn> directory */
596 snprintf(fname, fname_len, "SP/%s/pps.xml", fqdn);
603 free(fqdn);
611 free(fqdn);
620 free(fqdn);
627 free(fqdn);
637 free(fqdn);
644 if (cert && process_est_cert(ctx, cert, fqdn) < 0) {
646 free(fqdn);
649 free(fqdn);
685 process_est_cert(ctx, cert, ctx->fqdn) < 0) {
753 /* Remove old credentials based on HomeSP/FQDN */
754 static void remove_sp_creds(struct hs20_osu_client *ctx, const char *fqdn)
757 os_snprintf(cmd, sizeof(cmd), "REMOVE_CRED provisioning_sp=%s", fqdn);
1165 wpa_printf(MSG_INFO, "- HomeSP/FQDN = %s", str);
1244 char *fqdn = NULL;
1249 if (os_strcasecmp(name, "FQDN") == 0 && !fqdn) {
1250 fqdn = xml_node_get_text(ctx->xml, child);
1251 wpa_printf(MSG_INFO, "- HomeSP/OtherHomePartners/<X+>/FQDN = %s",
1252 fqdn);
1258 if (fqdn == NULL) {
1259 wpa_printf(MSG_INFO, "- HomeSP/OtherHomePartners/<X+> without FQDN ignored");
1263 if (set_cred_quoted(ctx->ifname, id, "domain", fqdn
1266 xml_node_get_text_free(ctx->xml, fqdn);
1314 else if (os_strcasecmp(name, "FQDN") == 0)
1483 xml_node_t *node, const char *fqdn)
1497 snprintf(buf, sizeof(buf), "%s/SP/%s/client-cert.pem", dir, fqdn);
1504 snprintf(buf, sizeof(buf), "%s/SP/%s/client-key.pem", dir, fqdn);
1514 xml_node_t *node, const char *fqdn, int sim)
1532 snprintf(buf, sizeof(buf), "%s/SP/%s/aaa-ca.pem", dir, fqdn);
1648 xml_node_t *node, const char *fqdn)
1668 set_pps_cred_digital_cert(ctx, id, child, fqdn);
1670 set_pps_cred_realm(ctx, id, child, fqdn, sim != NULL);
1683 xml_node_t *cred, const char *fqdn)
1704 set_pps_cred_credential(ctx, id, child, fqdn);
1713 const char *fqdn)
1725 remove_sp_creds(ctx, fqdn);
1756 if (set_cred_quoted(ctx->ifname, id, "provisioning_sp", fqdn) <
1760 set_pps_credential(ctx, id, child, fqdn);
1771 const char *fqdn;
1780 fqdn = os_strstr(pps_fname, "SP/");
1781 if (fqdn) {
1782 fqdn_buf = os_strdup(fqdn + 3);
1788 fqdn = fqdn_buf;
1790 fqdn = "wi-fi.org";
1792 wpa_printf(MSG_INFO, "Set PPS MO info to wpa_supplicant - SP FQDN %s",
1793 fqdn);
1794 set_pps(ctx, pps, fqdn);
1804 char *fqdn = NULL;
1812 node = get_child_node(ctx->xml, pps, "HomeSP/FQDN");
1814 fqdn = xml_node_get_text(ctx->xml, node);
1818 if (fqdn) {
1819 FILE *f = fopen("pps-fqdn", "w");
1821 fprintf(f, "%s", fqdn);
1824 xml_node_get_text_free(ctx->xml, fqdn);
1828 xml_node_get_text_free(ctx->xml, fqdn);
2415 if (os_strncmp(address, "fqdn=", 5) == 0) {
2416 wpa_printf(MSG_INFO, "Use requested FQDN from command line");
2421 wpa_printf(MSG_INFO, "Could not get provisioning Home SP FQDN from wpa_supplicant");
2424 os_free(ctx->fqdn);
2425 ctx->fqdn = os_strdup(buf);
2426 if (ctx->fqdn == NULL)
2428 wpa_printf(MSG_INFO, "Home SP FQDN for current credential: %s",
2431 "SP/%s/pps.xml", ctx->fqdn);
2435 ctx->fqdn);
2460 if (!ctx->fqdn) {
2462 node = get_child_node(ctx->xml, pps, "HomeSP/FQDN");
2464 wpa_printf(MSG_INFO, "No HomeSP/FQDN found from PPS");
2469 wpa_printf(MSG_INFO, "No HomeSP/FQDN text found from PPS");
2472 ctx->fqdn = os_strdup(tmp);
2474 if (!ctx->fqdn) {
2475 wpa_printf(MSG_INFO, "No FQDN known");
2505 "SP/%s/client-cert.pem", ctx->fqdn);
2508 "SP/%s/client-key.pem", ctx->fqdn);
2573 if (address && os_strncmp(address, "fqdn=", 5) == 0) {
2574 wpa_printf(MSG_INFO, "Use requested FQDN from command line");
2579 wpa_printf(MSG_INFO, "Could not get provisioning Home SP FQDN from wpa_supplicant");
2582 os_free(ctx->fqdn);
2583 ctx->fqdn = os_strdup(buf);
2584 if (ctx->fqdn == NULL)
2586 wpa_printf(MSG_INFO, "Home SP FQDN for current credential: %s",
2589 "SP/%s/pps.xml", ctx->fqdn);
2618 if (!ctx->fqdn) {
2620 node = get_child_node(ctx->xml, pps, "HomeSP/FQDN");
2622 wpa_printf(MSG_INFO, "No HomeSP/FQDN found from PPS");
2627 wpa_printf(MSG_INFO, "No HomeSP/FQDN text found from PPS");
2630 ctx->fqdn = os_strdup(tmp);
2632 if (!ctx->fqdn) {
2633 wpa_printf(MSG_INFO, "No FQDN known");
2663 "SP/%s/client-cert.pem", ctx->fqdn);
2666 "SP/%s/client-key.pem", ctx->fqdn);
2961 os_free(ctx->fqdn);