Home | History | Annotate | Download | only in client

Lines Matching defs:fqdn

86 static int valid_fqdn(const char *fqdn)
91 if (strchr(fqdn, '.') == 0 || strlen(fqdn) > 255)
93 for (pos = fqdn; *pos; pos++) {
119 * to read files from SP, SP/<fqdn>, Cert and osu-info directories */
219 const char *fqdn)
227 wpa_printf(MSG_INFO, "PPS for certificate credential - fqdn=%s", fqdn);
262 os_snprintf(buf, sizeof(buf), "SP/%s/client-ca.pem", fqdn);
270 os_snprintf(buf, sizeof(buf), "SP/%s/client-cert.pem", fqdn);
287 os_snprintf(buf, sizeof(buf), "SP/%s/client-key.pem", fqdn);
518 const char *fqdn)
523 match_len = os_strlen(fqdn);
535 if (os_strncasecmp(val + len - match_len, fqdn, match_len) != 0)
556 char *fqdn, *pos;
569 fqdn = strdup(uri + 8);
570 if (fqdn == NULL)
572 pos = strchr(fqdn, '/');
579 free(fqdn);
584 wpa_printf(MSG_INFO, "SP FQDN: %s", fqdn);
586 if (!server_dnsname_suffix_match(ctx, fqdn)) {
588 "FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values, count: %d",
589 fqdn, (int) ctx->server_dnsname_count);
590 write_result(ctx, "FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values",
591 fqdn);
592 free(fqdn);
596 if (!valid_fqdn(fqdn)) {
597 wpa_printf(MSG_INFO, "Invalid FQDN '%s'", fqdn);
598 write_result(ctx, "Invalid FQDN '%s'", fqdn);
599 free(fqdn);
604 snprintf(fname, fname_len, "SP/%s", fqdn);
610 free(fqdn);
618 snprintf(fname, fname_len, "SP/%s/pps.xml", fqdn);
625 free(fqdn);
633 free(fqdn);
642 free(fqdn);
649 free(fqdn);
659 free(fqdn);
666 if (cert && process_est_cert(ctx, cert, fqdn) < 0) {
668 free(fqdn);
671 free(fqdn);
707 process_est_cert(ctx, cert, ctx->fqdn) < 0) {
775 /* Remove old credentials based on HomeSP/FQDN */
776 static void remove_sp_creds(struct hs20_osu_client *ctx, const char *fqdn)
779 os_snprintf(cmd, sizeof(cmd), "REMOVE_CRED provisioning_sp=%s", fqdn);
1187 wpa_printf(MSG_INFO, "- HomeSP/FQDN = %s", str);
1266 char *fqdn = NULL;
1271 if (os_strcasecmp(name, "FQDN") == 0 && !fqdn) {
1272 fqdn = xml_node_get_text(ctx->xml, child);
1273 FQDN = %s",
1274 fqdn);
1280 if (fqdn == NULL) {
1281 wpa_printf(MSG_INFO, "- HomeSP/OtherHomePartners/<X+> without FQDN ignored");
1285 if (set_cred_quoted(ctx->ifname, id, "domain", fqdn) < 0)
1288 xml_node_get_text_free(ctx->xml, fqdn);
1338 else if (os_strcasecmp(name, "FQDN") == 0)
1589 xml_node_t *node, const char *fqdn)
1605 fqdn);
1615 fqdn);
1627 xml_node_t *node, const char *fqdn, int sim)
1646 res = os_snprintf(buf, sizeof(buf), "%s/SP/%s/aaa-ca.pem", dir, fqdn);
1764 xml_node_t *node, const char *fqdn)
1784 set_pps_cred_digital_cert(ctx, id, child, fqdn);
1786 set_pps_cred_realm(ctx, id, child, fqdn, sim != NULL);
1799 xml_node_t *cred, const char *fqdn)
1820 set_pps_cred_credential(ctx, id, child, fqdn);
1829 const char *fqdn)
1841 remove_sp_creds(ctx, fqdn);
1872 if (set_cred_quoted(ctx->ifname, id, "provisioning_sp", fqdn) <
1876 set_pps_credential(ctx, id, child, fqdn);
1887 const char *fqdn;
1896 fqdn = os_strstr(pps_fname, "SP/");
1897 if (fqdn) {
1898 fqdn_buf = os_strdup(fqdn + 3);
1904 fqdn = fqdn_buf;
1906 fqdn = "wi-fi.org";
1908 wpa_printf(MSG_INFO, "Set PPS MO info to wpa_supplicant - SP FQDN %s",
1909 fqdn);
1910 set_pps(ctx, pps, fqdn);
1920 char *fqdn = NULL;
1928 node = get_child_node(ctx->xml, pps, "HomeSP/FQDN");
1930 fqdn = xml_node_get_text(ctx->xml, node);
1934 if (fqdn) {
1935 FILE *f = fopen("pps-fqdn", "w");
1937 fprintf(f, "%s", fqdn);
1940 xml_node_get_text_free(ctx->xml, fqdn);
1944 xml_node_get_text_free(ctx->xml, fqdn);
2610 if (os_strncmp(address, "fqdn=", 5) == 0) {
2611 wpa_printf(MSG_INFO, "Use requested FQDN from command line");
2616 wpa_printf(MSG_INFO, "Could not get provisioning Home SP FQDN from wpa_supplicant");
2619 os_free(ctx->fqdn);
2620 ctx->fqdn = os_strdup(buf);
2621 if (ctx->fqdn == NULL)
2623 wpa_printf(MSG_INFO, "Home SP FQDN for current credential: %s",
2626 "SP/%s/pps.xml", ctx->fqdn);
2630 ctx->fqdn);
2655 if (!ctx->fqdn) {
2657 node = get_child_node(ctx->xml, pps, "HomeSP/FQDN");
2659 wpa_printf(MSG_INFO, "No HomeSP/FQDN found from PPS");
2664 wpa_printf(MSG_INFO, "No HomeSP/FQDN text found from PPS");
2667 ctx->fqdn = os_strdup(tmp);
2669 if (!ctx->fqdn) {
2670 wpa_printf(MSG_INFO, "No FQDN known");
2700 "SP/%s/client-cert.pem", ctx->fqdn);
2703 "SP/%s/client-key.pem", ctx->fqdn);
2770 if (address && os_strncmp(address, "fqdn=", 5) == 0) {
2771 wpa_printf(MSG_INFO, "Use requested FQDN from command line");
2776 wpa_printf(MSG_INFO, "Could not get provisioning Home SP FQDN from wpa_supplicant");
2779 os_free(ctx->fqdn);
2780 ctx->fqdn = os_strdup(buf);
2781 if (ctx->fqdn == NULL)
2783 wpa_printf(MSG_INFO, "Home SP FQDN for current credential: %s",
2786 "SP/%s/pps.xml", ctx->fqdn);
2792 os_free(ctx->fqdn);
2793 ctx->fqdn = NULL;
2820 if (!ctx->fqdn) {
2822 node = get_child_node(ctx->xml, pps, "HomeSP/FQDN");
2824 wpa_printf(MSG_INFO, "No HomeSP/FQDN found from PPS");
2829 wpa_printf(MSG_INFO, "No HomeSP/FQDN text found from PPS");
2832 ctx->fqdn = os_strdup(tmp);
2834 if (!ctx->fqdn) {
2835 wpa_printf(MSG_INFO, "No FQDN known");
2865 "SP/%s/client-cert.pem", ctx->fqdn);
2868 "SP/%s/client-key.pem", ctx->fqdn);
3163 os_free(ctx->fqdn);