tpm2_hash: Change default hashing alg from sha1 to sha256#3342
Open
idesai wants to merge 1 commit intotpm2-software:masterfrom
Open
tpm2_hash: Change default hashing alg from sha1 to sha256#3342idesai wants to merge 1 commit intotpm2-software:masterfrom
idesai wants to merge 1 commit intotpm2-software:masterfrom
Conversation
Signed-off-by: Imran Desai <imran.desai@intel.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3342 +/- ##
==========================================
- Coverage 74.38% 74.30% -0.09%
==========================================
Files 173 173
Lines 23673 23754 +81
==========================================
+ Hits 17610 17651 +41
- Misses 6063 6103 +40 ☔ View full report in Codecov by Sentry. |
Chiogros
reviewed
Mar 24, 2025
Chiogros
left a comment
There was a problem hiding this comment.
Fix comments to match the new algorithm.
| if [ "$tpm_hash_val" != "$sha1sum_val" ]; then | ||
| sha256sum_val=`echo 1234 | shasum -a 256 | cut -d\ -f 1-2 | tr -d '[:space:]'` | ||
| if [ "$tpm_hash_val" != "$sha256sum_val" ]; then | ||
| echo "Expected tpm and sha1sum to produce same hashes." |
There was a problem hiding this comment.
Suggested change
| echo "Expected tpm and sha1sum to produce same hashes." | |
| echo "Expected tpm and sha256sum to produce same hashes." |
| if [ "$tpm_hash_val" != "$sha1sum_val" ]; then | ||
| sha256sum_val=`shasum -a 256 $hash_in_file | cut -d\ -f 1-2 | tr -d '[:space:]'` | ||
| if [ "$tpm_hash_val" != "$sha256sum_val" ]; then | ||
| echo "Expected tpm and sha1sum to produce same hashes" |
There was a problem hiding this comment.
Suggested change
| echo "Expected tpm and sha1sum to produce same hashes" | |
| echo "Expected tpm and sha256sum to produce same hashes" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3340