• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/wpa/hs20/client/

Lines Matching refs: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)) {
589 fqdn, (int) ctx->server_dnsname_count);
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) {
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);
1265 char *fqdn = NULL;
1270 if (os_strcasecmp(name, "FQDN") == 0 && !fqdn) {
1271 fqdn = xml_node_get_text(ctx->xml, child);
1273 fqdn);
1279 if (fqdn == NULL) {
1284 if (set_cred_quoted(ctx->ifname, id, "domain", fqdn) < 0)
1287 xml_node_get_text_free(ctx->xml, fqdn);
1588 xml_node_t *node, const char *fqdn)
1604 fqdn);
1614 fqdn);
1626 xml_node_t *node, const char *fqdn, int sim)
1645 res = os_snprintf(buf, sizeof(buf), "%s/SP/%s/aaa-ca.pem", dir, fqdn);
1763 xml_node_t *node, const char *fqdn)
1783 set_pps_cred_digital_cert(ctx, id, child, fqdn);
1785 set_pps_cred_realm(ctx, id, child, fqdn, sim != NULL);
1798 xml_node_t *cred, const char *fqdn)
1819 set_pps_cred_credential(ctx, id, child, fqdn);
1828 const char *fqdn)
1840 remove_sp_creds(ctx, fqdn);
1871 if (set_cred_quoted(ctx->ifname, id, "provisioning_sp", fqdn) <
1875 set_pps_credential(ctx, id, child, fqdn);
1886 const char *fqdn;
1895 fqdn = os_strstr(pps_fname, "SP/");
1896 if (fqdn) {
1897 fqdn_buf = os_strdup(fqdn + 3);
1903 fqdn = fqdn_buf;
1905 fqdn = "wi-fi.org";
1908 fqdn);
1909 set_pps(ctx, pps, fqdn);
1919 char *fqdn = NULL;
1929 fqdn = xml_node_get_text(ctx->xml, node);
1933 if (fqdn) {
1934 FILE *f = fopen("pps-fqdn", "w");
1936 fprintf(f, "%s", fqdn);
1939 xml_node_get_text_free(ctx->xml, fqdn);
1943 xml_node_get_text_free(ctx->xml, fqdn);
2573 if (os_strncmp(address, "fqdn=", 5) == 0) {
2582 os_free(ctx->fqdn);
2583 ctx->fqdn = os_strdup(buf);
2584 if (ctx->fqdn == NULL)
2589 "SP/%s/pps.xml", ctx->fqdn);
2593 ctx->fqdn);
2618 if (!ctx->fqdn) {
2630 ctx->fqdn = os_strdup(tmp);
2632 if (!ctx->fqdn) {
2663 "SP/%s/client-cert.pem", ctx->fqdn);
2666 "SP/%s/client-key.pem", ctx->fqdn);
2733 if (address && os_strncmp(address, "fqdn=", 5) == 0) {
2742 os_free(ctx->fqdn);
2743 ctx->fqdn = os_strdup(buf);
2744 if (ctx->fqdn == NULL)
2749 "SP/%s/pps.xml", ctx->fqdn);
2755 os_free(ctx->fqdn);
2756 ctx->fqdn = NULL;
2783 if (!ctx->fqdn) {
2795 ctx->fqdn = os_strdup(tmp);
2797 if (!ctx->fqdn) {
2828 "SP/%s/client-cert.pem", ctx->fqdn);
2831 "SP/%s/client-key.pem", ctx->fqdn);
3119 os_free(ctx->fqdn);