Home | History | Annotate | Download | only in client

Lines Matching refs:PKCS7

13 #include <openssl/pkcs7.h>
31 static int pkcs7_to_cert(struct hs20_osu_client *ctx, const u8 *pkcs7,
37 PKCS7 *p7 = NULL;
38 const unsigned char *p = pkcs7;
48 CBS_init(&pkcs7_cbs, pkcs7, len);
125 unsigned char *pkcs7;
161 pkcs7 = base64_decode((unsigned char *) resp, resp_len, &pkcs7_len);
162 if (pkcs7 && pkcs7_len < resp_len / 2) {
165 os_free(pkcs7);
166 pkcs7 = NULL;
168 if (pkcs7 == NULL) {
169 wpa_printf(MSG_INFO, "EST workaround - Could not decode base64, assume this is DER encoded PKCS7");
170 pkcs7 = os_malloc(resp_len);
171 if (pkcs7) {
172 os_memcpy(pkcs7, resp, resp_len);
178 if (pkcs7 == NULL) {
179 wpa_printf(MSG_INFO, "Could not fetch PKCS7 cacerts");
184 res = pkcs7_to_cert(ctx, pkcs7, pkcs7_len, "Cert/est-cacerts.pem",
186 os_free(pkcs7);
681 unsigned char *pkcs7;
737 pkcs7 = base64_decode((unsigned char *) resp, resp_len, &pkcs7_len);
738 if (pkcs7 == NULL) {
739 wpa_printf(MSG_INFO, "EST workaround - Could not decode base64, assume this is DER encoded PKCS7");
740 pkcs7 = os_malloc(resp_len);
741 if (pkcs7) {
742 os_memcpy(pkcs7, resp, resp_len);
748 if (pkcs7 == NULL) {
754 res = pkcs7_to_cert(ctx, pkcs7, pkcs7_len, "Cert/est_cert.pem",
756 os_free(pkcs7);
759 wpa_printf(MSG_INFO, "EST: Failed to extract certificate from PKCS7 file");
760 write_result(ctx, "EST: Failed to extract certificate from EST PKCS7 file");