-
Notifications
You must be signed in to change notification settings - Fork 407
tpm2_hash: Change default hashing alg from sha1 to sha256 #3342
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
base: master
Are you sure you want to change the base?
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| echo "Expected tpm and sha1sum to produce same hashes" | |
| echo "Expected tpm and sha256sum to produce same hashes" |
Fixes #3340