espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.76k stars 7.3k forks source link

WPA2-Enterprise PEAP-MSCHAPv2: "Method private structure allocated failure" (IDFGH-517) #2858

Closed daniol closed 4 years ago

daniol commented 5 years ago

Environment

Problem Description

I try to establish a connection to a WPA2-Enterprise with PEAP-EAP-MSCHAPv2 network (user/password authentication). The access point is using TekRADIUS as radius server. The connection on ESP32 doesn't work, it fails after some time with code 204 (handshake timeout).

Actual Behavior

The connection with ESP32 doesn't work According to the logs:

wpa: TLSv1: Record Layer - Failed to initialize HMAC
wpa: TLSv1: Failed to create a record
wpa: Method private structure allocated failure

Expected Behavior

The connection should work, as my Windows computer and my Android phone does with no problems. See the Windows network configuration which works: https://pasteboard.co/HSIBhWp.png On Android I don't set up any certificate, just user/password and it works.

Code to reproduce this issue

See https://gist.github.com/daniol/6c489f8c5d7836f55c1ea2b115cac3a3

Debug Logs

ESP32-Log: https://pastebin.com/QsxpdiTJ TekRADIUS-Log: https://pastebin.com/P3WUGyXw

Remarks

I tried everything, including the following modifications, without success:

daniol commented 5 years ago

I attach also a log of TekRADIUS of the successful Windows 7 connection: https://pastebin.com/MB83M4Uy

negativekelvin commented 5 years ago

Does it also happen in master or only if you backport?

daniol commented 5 years ago

Does it also happen in master or only if you backport?

Both

sagb2015 commented 5 years ago

Apologies for late reply. Do you still this issue with current master? Or can you point the master commit that you used?

sagb2015 commented 4 years ago

@daniol Closing because of lack of feedback. Feel free to open if you still see the issue.