Home | History | Annotate | Download | only in client

Lines Matching refs:cert

166 	mkdir("Cert", S_IRWXU);
182 static int process_est_cert(struct hs20_osu_client *ctx, xml_node_t *cert,
193 fingerprint = xml_node_get_text(ctx->xml, cert);
204 der = os_readfile("Cert/est_cert.der", &der_len);
224 unlink("Cert/est_cert.der");
227 if (rename("Cert/est-cacerts.pem", buf) < 0) {
234 os_snprintf(buf, sizeof(buf), "SP/%s/client-cert.pem", fqdn);
235 if (rename("Cert/est_cert.pem", buf) < 0) {
236 wpa_printf(MSG_INFO, "Could not move est_cert.pem to client-cert.pem: %s",
252 if (rename("Cert/privkey-plain.pem", buf) < 0) {
258 unlink("Cert/est-req.b64");
259 unlink("Cert/est-req.pem");
260 unlink("Cert/est-resp.raw");
261 rmdir("Cert");
267 #define TMP_CERT_DL_FILE "tmp-cert-download"
274 char *cert;
315 cert = os_readfile(TMP_CERT_DL_FILE, &len);
317 if (cert == NULL)
320 if (sha256_vector(1, (const u8 **) &cert, &len, digest2) < 0) {
321 os_free(cert);
328 os_free(cert);
332 b64 = base64_encode((unsigned char *) cert, len, NULL);
333 os_free(cert);
518 xml_node_t *tnds, *mo, *cert;
619 cert = get_child_node(ctx->xml, mo,
622 if (cert && process_est_cert(ctx, cert, fqdn) < 0) {
658 xml_node_t *cert;
659 cert = get_child_node(ctx->xml, pps,
662 if (cert && os_file_exists("Cert/est_cert.der") &&
663 process_est_cert(ctx, cert, ctx->fqdn) < 0) {
1467 if (set_cred_quoted(ctx->ifname, id, "username", "cert") < 0) {
1471 snprintf(buf, sizeof(buf), "%s/SP/%s/client-cert.pem", dir, fqdn);
1509 wpa_printf(MSG_INFO, "Failed to set CA cert");
2457 "SP/%s/client-cert.pem", ctx->fqdn);
2614 "SP/%s/client-cert.pem", ctx->fqdn);
2693 static int osu_cert_cb(void *_ctx, struct http_cert *cert)
2708 ctx->server_dnsname = os_calloc(cert->num_dnsname, sizeof(char *));
2712 for (i = 0; i < cert->num_dnsname; i++) {
2715 os_strdup(cert->dnsname[i]);
2719 if (host && os_strcasecmp(host, cert->dnsname[i]) == 0)
2721 wpa_printf(MSG_INFO, "dNSName '%s'", cert->dnsname[i]);
2735 for (i = 0; i < cert->num_othername; i++) {
2736 if (os_strcmp(cert->othername[i].oid,
2740 cert->othername[i].data,
2741 cert->othername[i].len);
2748 for (i = 0; i < cert->num_othername; i++) {
2749 if (os_strcmp(cert->othername[i].oid,
2752 if (cert->othername[i].len < 3)
2754 if (os_strncasecmp((char *) cert->othername[i].data,
2757 if (os_strncmp((char *) cert->othername[i].data + 3,
2759 cert->othername[i].len - 3) == 0) {
2776 for (i = 0; i < cert->num_logo; i++) {
2777 struct http_logo *logo = &cert->logo[i];
2792 for (i = 0; i < cert->num_logo; i++) {
2793 struct http_logo *logo = &cert->logo[i];
2824 for (i = 0; i < cert->num_logo; i++) {
2825 struct http_logo *logo = &cert->logo[i];
2943 "- pol_upd [Server URL] [PPS] [CA cert]\n"
2944 "- sub_rem <Server URL> [PPS] [CA cert]\n"
2945 "- prov <Server URL> [CA cert]\n"
2946 "- oma_dm_prov <Server URL> [CA cert]\n"
2947 "- sim_prov <Server URL> [CA cert]\n"
2948 "- oma_dm_sim_prov <Server URL> [CA cert]\n"
2949 "- signup [CA cert]\n"
2955 "- osu_select <OSU info directory> [CA cert]\n");
3169 mkdir("Cert", S_IRWXU);