Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: src/platform/vboot_reference/crypto/genpadding.sh

Issue 1585007: combined patch for: (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/platform/vboot_reference/crypto/padding.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/vboot_reference/crypto/genpadding.sh
diff --git a/src/platform/vboot_reference/crypto/genpadding.sh b/src/platform/vboot_reference/crypto/genpadding.sh
index 6086c8de17b63b0cd7cc02684e3c9748fa7704ff..baac71bd5a715a81386476f67f91153b6d1e2962 100755
--- a/src/platform/vboot_reference/crypto/genpadding.sh
+++ b/src/platform/vboot_reference/crypto/genpadding.sh
@@ -48,8 +48,7 @@ cat <<EOF
EOF
-echo '#include "rsa.h"'
-echo '#include "sha.h"'
+echo '#include "cryptolib.h"'
echo
echo
cat <<EOF
@@ -172,6 +171,18 @@ done
echo "};"
echo
+# Generate signature algorithm to messge digest algorithm map.
+echo "const int hash_type_map[] = {"
+for rsaalgo in ${RSAAlgos[@]}
+do
+ for hashalgo in ${HashAlgos[@]}
+ do
+ echo ${hashalgo}_DIGEST_ALGORITHM,
+ done
+done
+echo "};"
+echo
+
# Generate algorithm to message digest's output size map.
echo "const int hash_size_map[NUMALGORITHMS] = {"
for rsaalgo in ${RSAAlgos[@]}
« no previous file with comments | « no previous file | src/platform/vboot_reference/crypto/padding.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698