diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2014-11-13 17:13:40 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-13 17:13:41 +0000 |
commit | 2028b97788ab3723d55270e02658e87e066ad262 (patch) | |
tree | 957911d2ee1ea2b1d836ae3e6063515b615c82e3 | |
parent | d2d55d6906f6c1a428d72656329eaedcb213dcc0 (diff) | |
parent | a3465e250cfc3c00931735711e11ad61cf84d8b2 (diff) | |
download | system_core-2028b97788ab3723d55270e02658e87e066ad262.zip system_core-2028b97788ab3723d55270e02658e87e066ad262.tar.gz system_core-2028b97788ab3723d55270e02658e87e066ad262.tar.bz2 |
Merge "Switch fs_mgr to use SHA-256 instead of SHA-1"
-rw-r--r-- | fs_mgr/fs_mgr_verity.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs_mgr/fs_mgr_verity.c b/fs_mgr/fs_mgr_verity.c index ef7cf6e..f02781c 100644 --- a/fs_mgr/fs_mgr_verity.c +++ b/fs_mgr/fs_mgr_verity.c @@ -86,11 +86,11 @@ static RSAPublicKey *load_key(char *path) static int verify_table(char *signature, char *table, int table_length) { RSAPublicKey *key; - uint8_t hash_buf[SHA_DIGEST_SIZE]; + uint8_t hash_buf[SHA256_DIGEST_SIZE]; int retval = -1; // Hash the table - SHA_hash((uint8_t*)table, table_length, hash_buf); + SHA256_hash((uint8_t*)table, table_length, hash_buf); // Now get the public key from the keyfile key = load_key(VERITY_TABLE_RSA_KEY); @@ -104,7 +104,7 @@ static int verify_table(char *signature, char *table, int table_length) (uint8_t*) signature, RSANUMBYTES, (uint8_t*) hash_buf, - SHA_DIGEST_SIZE)) { + SHA256_DIGEST_SIZE)) { ERROR("Couldn't verify table."); goto out; } |