Closed Bartvelp closed 4 years ago
Still don't know what caused this issue, but when pasting the public key in the project directory, arduino uses signing.py to add verification itself. It then failes to actually sign the binairy, but I can just do that by hand, using the same signing.py. Weird issue though, should still be checked out imo. Can anybody reproduce?
@Bartvelp, for signing you need a private.key
and the corresponding public.key
.
W/o the private key, signing can't work and won't be enabled. So the main thing you're experiencing is expected and the only possible thing for the Arduino IDE to do. You need both in the dir if you're going to build signed apps or apps which require signing.
Also, of course, if you're really signing apps then you should generate your own key pair and use that in place of the (unsafe...private.key is public) ones in the example.
When I copied over the example with the two key files, I did get a xxx.bin.legacy_sig and an xxx.signed. Note that the IDE generates these in the temp build directory, where it makes the .bin file, so you need to poke there to get them.
As for the non-Arduino IDE build errors, unfortunately we can't really help. Some IDEs don't parse the platform.txt file properly.
Basic Infos
Platform
Settings in IDE
Problem Description
When compiling the example sketch
httpUpdateSigned
everything works as expected, but when saving this exact sketch to another directory, I get the following error:When compiling with the VScode Arduino extension, the project compiles successfully, but gives a hardware watchdog timer reset when trying to verify the hash. If I omit setting the hash everything works fine
MCVE Sketch
Debug Messages
I suspected it may be due to the key files that are present in the example sketch but not in the saved example sketch, but copying them to the directory did not solve the issue. This method seems to have been added in this pull request: https://github.com/esp8266/Arduino/pull/6398/files by @dok-net