Skip to content
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

Set of a new hash computing functions (SP1) #141

Merged
merged 5 commits into from
Mar 2, 2023

Conversation

softwarecki
Copy link
Contributor

Moved byte_swap function to a new misc_utils.c file. This function will be used in different places in the code.

Prepared a set of fa new unctions for computing digest with error handling. The hash context has been placed into a separate structure. This allows to conveniently pass the calculated digest along with its length and used algorithm.

Switched to use new hash functions. The parameter list for the rimage_sign and rimage_verify functions has been simplified. The necessary information is now included in the hash_context structure. In addition, code fragments that may be common to different versions of the manifest have been separated.

Fields related to hash computing have been removed from the image structure. Removed openssl headers from rimage.h, which made it necessary to add some missing includes in several files.

Copy link
Contributor

@aborisovich aborisovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll just skip repeating what cppcheck said and idicate, that the fact that it is "green" does not mean it did not find issues ;-)

Copy link
Contributor

@aborisovich aborisovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First look from me, I'll dig into the code tomorrow some more.

This function will be used in different places in the code, so I moved it
to a separate file.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Prepared a new set of functions for computing digest with error handling.
The hash context has been placed into a separate structure. This allows
to conveniently pass the calculated digest along with its length and used
algorithm.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Switched to use new hash functions. The parameter list for the rimage_sign
and rimage_verify functions has been simplified. The necessary information
is now included in the hash_context structure. In addition, code fragments
that may be common to different versions of the manifest have been
separated.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Removed currently unused functions.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Fields related to hash computing have been removed from the image
structure. Removed openssl headers from rimage.h, which made it necessary
to add some missing includes in several files.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Copy link
Contributor

@aborisovich aborisovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It slowly starts to look like a program, good job ;-)
I assume you had tested it on both windows and linux yes?

@pjdobrowolski pjdobrowolski merged commit 6fad356 into thesofproject:main Mar 2, 2023
@marc-hb
Copy link
Contributor

marc-hb commented Mar 6, 2023

This does not compile, fix submitted in #144

@marc-hb
Copy link
Contributor

marc-hb commented Mar 6, 2023

It's pretty easy to submit a temporary/draft/throw-away sof/west.yml test PR and make SOF CI run the FULL SOF test suites on test rimage changes BEFORE they're merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants