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
Update mbed TLS 2.1.1 -> TLS 2.9.0 #1474
Comments
The (first ?) troublemaker during compilation are calls to functions in sha256.c |
Probably we could have a I'm not against changing However I'd prefer not to use the submodule approach. If you updated as part of the build it'd mean that you could no longer tell exactly which Espruino you got based on the commit hash - Travis builds would pass and then mbedtls would get updated and it'd all break again. I think this time I'd just include the new mbedtls - maybe it's something we could tweak later but I'd prefer not to change too much. |
We're using it for the build tools. You pin the folder to be a link to release you want to use: https://github.com/espruino/EspruinoBuildTools/tree/master/esp32/build It works like a symbolic link in unix: So this is pinned to the 3.0.1 release. |
Ahh, sorry - yeah, I do this as part of EspruinoWebIDE. I notice there is one local change in there apart from As long as it doesn't cause problems with the Travis build then let's try it then. It is nice to reduce the amount of code in the repo - I just don't want to do anything that makes the build less reliable :) |
Great. If the config.h is out of tree where would config.h go? https://github.com/espruino/Espruino/tree/master/libs/crypto |
Looks like we define this to the config.h path |
At least that's the form I take with the nRF5x SDK |
Would that be a .h file or a folder? |
Well, since we can actually make it a file with That's way nicer than having a random |
Ok, so step one would be to get the existing build working with the new #define and the config in it's new place. Then as a second step swap out to a new version, and the new update the changed functions. Later on for the esp32 build, we can also look at using the ESP-idf build version of the library, as this has hardware assist. |
I've checked one more option.
Before spending more time on that, I would like to wait for feedback ;-) |
Sorry, closed it by accident |
Or even a better way to avoid board specific naming in makefile
|
^^^ That looks good. Only thing I'd say is to try and avoid as much duplication as possible (eg |
Ok, I take it back - it's different :) Yeah, I'd do as you suggest then. Nice to move all of that out of |
The existing build for ESP32 uses the espruino mbedtls. So why does this need to change for the 3.1 release? I’m missing something here. |
Somewhere in ESP-IDF mbedtls functions are called. To be honest, I've no idea where and why. |
Discussion here:
http://forum.espruino.com/conversations/322572/#comment14302294
The only changes I can see are in the config file:
https://github.com/espruino/Espruino/blame/master/libs/crypto/mbedtls/config.h
@gfwilliams Am I missing anything else?
esp-idf uses the submodule approach:
mbedtls @ b3a48ac mbedtls: re-add version 2.9.0 as a submodule
https://github.com/espressif/esp-idf/tree/master/components/mbedtls
This would be the best way so that the files don't need to be copied and we can change version easily by just changing the
.gitmodules
reference.git submodule update --init --recursive
mbedtls
The text was updated successfully, but these errors were encountered: