Lines Matching refs:pkcs7
27 static int pkcs7_to_cert(struct hs20_osu_client *ctx, const u8 *pkcs7, in pkcs7_to_cert() argument
31 const unsigned char *p = pkcs7; in pkcs7_to_cert()
99 unsigned char *pkcs7; in est_load_cacerts() local
135 pkcs7 = base64_decode((unsigned char *) resp, resp_len, &pkcs7_len); in est_load_cacerts()
136 if (pkcs7 && pkcs7_len < resp_len / 2) { in est_load_cacerts()
139 os_free(pkcs7); in est_load_cacerts()
140 pkcs7 = NULL; in est_load_cacerts()
142 if (pkcs7 == NULL) { in est_load_cacerts()
144 pkcs7 = os_malloc(resp_len); in est_load_cacerts()
145 if (pkcs7) { in est_load_cacerts()
146 os_memcpy(pkcs7, resp, resp_len); in est_load_cacerts()
152 if (pkcs7 == NULL) { in est_load_cacerts()
158 res = pkcs7_to_cert(ctx, pkcs7, pkcs7_len, "Cert/est-cacerts.pem", in est_load_cacerts()
160 os_free(pkcs7); in est_load_cacerts()
620 unsigned char *pkcs7; in est_simple_enroll() local
682 pkcs7 = base64_decode((unsigned char *) resp, resp_len, &pkcs7_len); in est_simple_enroll()
683 if (pkcs7 == NULL) { in est_simple_enroll()
685 pkcs7 = os_malloc(resp_len); in est_simple_enroll()
686 if (pkcs7) { in est_simple_enroll()
687 os_memcpy(pkcs7, resp, resp_len); in est_simple_enroll()
693 if (pkcs7 == NULL) { in est_simple_enroll()
699 res = pkcs7_to_cert(ctx, pkcs7, pkcs7_len, "Cert/est_cert.pem", in est_simple_enroll()
701 os_free(pkcs7); in est_simple_enroll()