Changeset View
Changeset View
Standalone View
Standalone View
contrib/wpa/hs20/client/est.c
Context not available. | |||||
return -1; | return -1; | ||||
} | } | ||||
pkcs7 = base64_decode((unsigned char *) resp, resp_len, &pkcs7_len); | pkcs7 = base64_decode(resp, resp_len, &pkcs7_len); | ||||
if (pkcs7 && pkcs7_len < resp_len / 2) { | if (pkcs7 && pkcs7_len < resp_len / 2) { | ||||
wpa_printf(MSG_INFO, "Too short base64 decode (%u bytes; downloaded %u bytes) - assume this was binary", | wpa_printf(MSG_INFO, "Too short base64 decode (%u bytes; downloaded %u bytes) - assume this was binary", | ||||
(unsigned int) pkcs7_len, (unsigned int) resp_len); | (unsigned int) pkcs7_len, (unsigned int) resp_len); | ||||
Context not available. | |||||
return -1; | return -1; | ||||
} | } | ||||
attrs = base64_decode((unsigned char *) resp, resp_len, | attrs = base64_decode(resp, resp_len, &attrs_len); | ||||
&attrs_len); | |||||
os_free(resp); | os_free(resp); | ||||
if (attrs == NULL) { | if (attrs == NULL) { | ||||
Context not available. | |||||
} | } | ||||
wpa_printf(MSG_DEBUG, "EST simpleenroll response: %s", resp); | wpa_printf(MSG_DEBUG, "EST simpleenroll response: %s", resp); | ||||
pkcs7 = base64_decode((unsigned char *) resp, resp_len, &pkcs7_len); | pkcs7 = base64_decode(resp, resp_len, &pkcs7_len); | ||||
if (pkcs7 == NULL) { | if (pkcs7 == NULL) { | ||||
wpa_printf(MSG_INFO, "EST workaround - Could not decode base64, assume this is DER encoded PKCS7"); | wpa_printf(MSG_INFO, "EST workaround - Could not decode base64, assume this is DER encoded PKCS7"); | ||||
pkcs7 = os_malloc(resp_len); | pkcs7 = os_malloc(resp_len); | ||||
Context not available. |