Lines Matching refs:pkcs7
30 static int pkcs7_to_cert(struct hs20_osu_client *ctx, const u8 *pkcs7, in pkcs7_to_cert() argument
37 const unsigned char *p = pkcs7; in pkcs7_to_cert()
47 CBS_init(&pkcs7_cbs, pkcs7, len); in pkcs7_to_cert()
124 unsigned char *pkcs7; in est_load_cacerts() local
160 pkcs7 = base64_decode((unsigned char *) resp, resp_len, &pkcs7_len); in est_load_cacerts()
161 if (pkcs7 && pkcs7_len < resp_len / 2) { in est_load_cacerts()
164 os_free(pkcs7); in est_load_cacerts()
165 pkcs7 = NULL; in est_load_cacerts()
167 if (pkcs7 == NULL) { in est_load_cacerts()
169 pkcs7 = os_malloc(resp_len); in est_load_cacerts()
170 if (pkcs7) { in est_load_cacerts()
171 os_memcpy(pkcs7, resp, resp_len); in est_load_cacerts()
177 if (pkcs7 == NULL) { in est_load_cacerts()
183 res = pkcs7_to_cert(ctx, pkcs7, pkcs7_len, "Cert/est-cacerts.pem", in est_load_cacerts()
185 os_free(pkcs7); in est_load_cacerts()
668 unsigned char *pkcs7; in est_simple_enroll() local
730 pkcs7 = base64_decode((unsigned char *) resp, resp_len, &pkcs7_len); in est_simple_enroll()
731 if (pkcs7 == NULL) { in est_simple_enroll()
733 pkcs7 = os_malloc(resp_len); in est_simple_enroll()
734 if (pkcs7) { in est_simple_enroll()
735 os_memcpy(pkcs7, resp, resp_len); in est_simple_enroll()
741 if (pkcs7 == NULL) { in est_simple_enroll()
747 res = pkcs7_to_cert(ctx, pkcs7, pkcs7_len, "Cert/est_cert.pem", in est_simple_enroll()
749 os_free(pkcs7); in est_simple_enroll()