-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A bit of failure reporting in esp-tls (IDFGH-10815) #12026
Comments
Hi @dannybackx, thanks for the issue, esp-idf/components/esp-tls/esp_tls.h Line 632 in b4268c8
This shall provide you the last error occurred for esp-tls of respective type. If you give the error type as ESP_TLS_ERROR_TYPE_MBEDTLS to this API then you shall get the last mbedtls error that has occurred in esp-tls.Let me know if the above API fixes your issue. Thanks, Aditya |
Hmm I don't see my reply turning up here so I'll copy it. Next to the function you point to, I also find esp_tls_get_error_handle() which I appear to need to fetch an error handle. The argument to that is an esp_tls_t pointer which I only get from user_cb. So if I create a secure web server and pass it certificate info, it'll call mbedtls functions for that. If these fail, then I don't know where to get the info from.
Note also that my example in the original question can't be resolved with this - user_cb is never called. |
I don't see any work on this (in esp_tls.h) in 5.2 beta 1 ? |
Hello @dannybackx |
I confirmed that this works for me, thanks. See svn+ssh://dannybackx@svn.code.sf.net/p/esp32-s3-86-box-project-base/code/trunk/alarm/main/WebServer.cpp lines 64..83 . Example output (only the httpsErrorHandler line is relevant) : |
Looks like one of the cases doesn't work : In the "performing session handshake" piece (line 170), the new code adds printing the hex value of ret and then jumps to "fail" but then only zeroes get reported.
|
Is your feature request related to a problem?
When debugging a https server, mbedtls error codes are lost (in components/esp-tls).
This is frustrating.
Describe the solution you'd like.
Describe alternatives you've considered.
No response
Additional context.
No response
The text was updated successfully, but these errors were encountered: