-
Notifications
You must be signed in to change notification settings - Fork 5
Compile errors when not using the embeded bundle #2
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
Comments
Btw I can comment out these 2 lines without affecting your sketch in any way: Using your bool use_bundled it will use "x509_crt_imported_bundle_bin_start" anyway: |
Ahh right. Probably some leftover code from messing around with it. Yeah the start address is defined in the espressiff files Thanks for picking it up. My intentions with the sketch was to get something working, and then try and work it into a PR-suitable state. I like your idea of allowing the use of SPIFFS, but I'd also like to retain the functionality of using an embedded bundle, if one doesn't wish to use a file system for whatever reason. I think we can get around that check if we supply an Is it possible to generate such an object from your streamer (I haven't looked other projects have swamped me recently :)) |
Another thing I'm not familiar with, is how the Arduino IDE would work with this kinda flow. Is there a similar option to run a pre-script to generate and upload/embedd the bundle? |
I'll dive deaper into your previous reply tomorrow from a pc.. First thoughts :
|
@Duckle29 Unfortunately it currently fails even if we comment everyting out execpt WiFiClientSecure *client = new WiFiClientSecure; in your example. Our issue seems to be that the compiler checks the esp_crt_bundle.c even when it is not used.... As you are swamped out, here's the rundown of my function: |
@Duckle29 Do you mind if I try and get the others from the original issue, who inspired you to use the esp_crt_bundle.h, involved? |
I don't mind at all :) I'll probably poke at it at some point too. Just can't right now . |
@Duckle29 Probably different as he had in mind but this is how I did it: Add the following to your platform.ini build_flags = -D EMBEDDED_BUNDLE=true Which will enable the embedded bundle when not using loadCertBundle(Stream& stream, size_t size) Now all the other (and Arduino IDE;) users can still use the other WiFiClientSecure options and compile without the compile error: |
@Duckle29 And let's think about bundling our work in a PR because I think we are ready to share our mods. |
Hi @Duckle29,
great work! As you might have read here I forked and extended your modified library with a function to load the certificate bundle from SPIFFS.
https://github.com./Onno-Dirkzwager/esp32-certBundle?organization=Onno-Dirkzwager&organization=Onno-Dirkzwager
While doing so I discovered that if people would use this library without the bundle or platform.ini scripts compile errors will occur:
.pio\build\esp32dev\lib499\libWiFiClientSecure.a(esp_crt_bundle.c.o):(.literal.esp_crt_bundle_attach+0x8): undefined reference to `_binary_x509_crt_bundle_start'
Simply commenting out this line solves the compile error (as it is not even used when loading from SPIFFS or not using the bundle at all)
Onno-Dirkzwager@b365a4a
Ideally, we would not modify the esp_crt_bundle.c file at all..... I think I'm missing something and hope that we can work this out together. As these modifications will be very useful for a lot of people.
Any ideas?
The text was updated successfully, but these errors were encountered: