Re: Allow encrypting data in FIT with binman

Hi Paul,
Unfortunately I did not receive the email with your patch but I see it in patchwork here:
https://patchwork.ozlabs.org/bundle/sjg/dm/?series=408037
I get this error:
binman test testSimpleFitEncryptedData ======================== Running binman tests ======================== E ====================================================================== ERROR: testSimpleFitEncryptedData (binman.ftest.TestFunctional) Test an image with a FIT containing data to be encrypted ---------------------------------------------------------------------- ValueError: Error 1 running 'mkimage -t -k tools/binman/test -F /tmp/binman.s_qv4_fc/fit.fit': File tools/binman/test/aes256.bin don't have the expected size (size=0, expected=32) mkimage Can't add hashes to FIT blob: -1 Error: Bad parameters for FIT image type Usage: mkimage [-T type] -l image ...
The aes.bin file seems to be empty for me. Can you please check the patch?
Thank you for doing a proper test. Can you also please update the docs for Entry_fit to cover your new property, and regenerate entries.rst ?
Note that there is a tools.readfile() helper which can read a binary/text file.
Regards, Simon

Hi Simon,
Sorry for the late reply as I missed your message blocked in quarantine. It looks like when I push a patch with binary data, patchworks does not seem to get it right. Nonetheless, using git send-email, a copy is also sent to me and I do get the patch right. I put you in CC this time so you should also have received a copy of the patches. Could you take a look you get the patch "[v2,3/3] tools: binman: Add tests for FIT with data encrypted by mkimage" with the binary data?
The end of the patch with the binary data should be as such:
diff --git a/tools/binman/test/aes256.bin b/tools/binman/test/aes256.bin new file mode 100644 index 0000000000000000000000000000000000000000..09b8bf6254ada5c084039f32916bc7d30233bb2c GIT binary patch literal 32 ncmXpsGBz<aGq<obNK8sjNli=7$jr*l$<50zC@d;2DJ=s4pC}7U
literal 0 HcmV?d00001
FYI, I also added the requested changes.
Best regards, Paul
________________________________________ From: Simon Glass sjg@chromium.org Sent: Monday, 1 July 2024 15:57 To: U-Boot Mailing List u-boot@lists.denx.de Cc: Paul HENRYS (EXT) paul.henrys_ext@softathome.com Subject: Re: Allow encrypting data in FIT with binman
This Mail comes from Outside of SoftAtHome: Do not answer, click links or open attachments unless you recognize the sender and know the content is safe.
Hi Paul,
Unfortunately I did not receive the email with your patch but I see it in patchwork here:
https://patchwork.ozlabs.org/bundle/sjg/dm/?series=408037
I get this error:
binman test testSimpleFitEncryptedData ======================== Running binman tests ======================== E ====================================================================== ERROR: testSimpleFitEncryptedData (binman.ftest.TestFunctional) Test an image with a FIT containing data to be encrypted ---------------------------------------------------------------------- ValueError: Error 1 running 'mkimage -t -k tools/binman/test -F /tmp/binman.s_qv4_fc/fit.fit': File tools/binman/test/aes256.bin don't have the expected size (size=0, expected=32) mkimage Can't add hashes to FIT blob: -1 Error: Bad parameters for FIT image type Usage: mkimage [-T type] -l image ...
The aes.bin file seems to be empty for me. Can you please check the patch?
Thank you for doing a proper test. Can you also please update the docs for Entry_fit to cover your new property, and regenerate entries.rst ?
Note that there is a tools.readfile() helper which can read a binary/text file.
Regards, Simon
participants (2)
-
Paul HENRYS (EXT)
-
Simon Glass