Lines Matching refs:cert
171 mkdir("Cert", S_IRWXU);
187 static int process_est_cert(struct hs20_osu_client *ctx, xml_node_t *cert,
198 fingerprint = xml_node_get_text(ctx->xml, cert);
209 der = os_readfile("Cert/est_cert.der", &der_len);
229 unlink("Cert/est_cert.der");
232 if (rename("Cert/est-cacerts.pem", buf) < 0) {
239 os_snprintf(buf, sizeof(buf), "SP/%s/client-cert.pem", fqdn);
240 if (rename("Cert/est_cert.pem", buf) < 0) {
241 wpa_printf(MSG_INFO, "Could not move est_cert.pem to client-cert.pem: %s",
257 if (rename("Cert/privkey-plain.pem", buf) < 0) {
263 unlink("Cert/est-req.b64");
264 unlink("Cert/est-req.pem");
265 unlink("Cert/est-resp.raw");
266 rmdir("Cert");
272 #define TMP_CERT_DL_FILE "tmp-cert-download"
279 char *cert;
320 cert = os_readfile(TMP_CERT_DL_FILE, &len);
322 if (cert == NULL)
325 if (sha256_vector(1, (const u8 **) &cert, &len, digest2) < 0) {
326 os_free(cert);
333 os_free(cert);
337 b64 = base64_encode((unsigned char *) cert, len, NULL);
338 os_free(cert);
523 xml_node_t *tnds, *mo, *cert;
641 cert = get_child_node(ctx->xml, mo,
644 if (cert && process_est_cert(ctx, cert, fqdn) < 0) {
680 xml_node_t *cert;
681 cert = get_child_node(ctx->xml, pps,
684 if (cert && os_file_exists("Cert/est_cert.der") &&
685 process_est_cert(ctx, cert, ctx->fqdn) < 0) {
1493 if (set_cred_quoted(ctx->ifname, id, "username", "cert") < 0) {
1497 snprintf(buf, sizeof(buf), "%s/SP/%s/client-cert.pem", dir, fqdn);
1535 wpa_printf(MSG_INFO, "Failed to set CA cert");
2505 "SP/%s/client-cert.pem", ctx->fqdn);
2663 "SP/%s/client-cert.pem", ctx->fqdn);
2742 static int osu_cert_cb(void *_ctx, struct http_cert *cert)
2757 ctx->server_dnsname = os_calloc(cert->num_dnsname, sizeof(char *));
2761 for (i = 0; i < cert->num_dnsname; i++) {
2764 os_strdup(cert->dnsname[i]);
2768 if (host && os_strcasecmp(host, cert->dnsname[i]) == 0)
2770 wpa_printf(MSG_INFO, "dNSName '%s'", cert->dnsname[i]);
2784 for (i = 0; i < cert->num_othername; i++) {
2785 if (os_strcmp(cert->othername[i].oid,
2789 cert->othername[i].data,
2790 cert->othername[i].len);
2797 for (i = 0; i < cert->num_othername; i++) {
2798 if (os_strcmp(cert->othername[i].oid,
2801 if (cert->othername[i].len < 3)
2803 if (os_strncasecmp((char *) cert->othername[i].data,
2806 if (os_strncmp((char *) cert->othername[i].data + 3,
2808 cert->othername[i].len - 3) == 0) {
2825 for (i = 0; i < cert->num_logo; i++) {
2826 struct http_logo *logo = &cert->logo[i];
2842 for (i = 0; i < cert->num_logo; i++) {
2843 struct http_logo *logo = &cert->logo[i];
2877 for (i = 0; i < cert->num_logo; i++) {
2878 struct http_logo *logo = &cert->logo[i];
3010 "- pol_upd [Server URL] [PPS] [CA cert]\n"
3011 "- sub_rem <Server URL> [PPS] [CA cert]\n"
3012 "- prov <Server URL> [CA cert]\n"
3013 "- oma_dm_prov <Server URL> [CA cert]\n"
3014 "- sim_prov <Server URL> [CA cert]\n"
3015 "- oma_dm_sim_prov <Server URL> [CA cert]\n"
3016 "- signup [CA cert]\n"
3022 "- osu_select <OSU info directory> [CA cert]\n");
3233 mkdir("Cert", S_IRWXU);