diff options
author | Doug Zongker <dougz@android.com> | 2013-04-10 11:32:17 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2013-09-25 10:11:46 -0700 |
commit | 30362a6ad132cbafde82cc57293e00679d4f86c2 (patch) | |
tree | 47f9585d4cd72de8a3fb935d8e8387763ce3a9b1 /verifier.h | |
parent | 5c4e1dac0bd8f31559bd50eec4343b7a17b7a976 (diff) | |
download | bootable_recovery-30362a6ad132cbafde82cc57293e00679d4f86c2.tar.gz bootable_recovery-30362a6ad132cbafde82cc57293e00679d4f86c2.tar.bz2 bootable_recovery-30362a6ad132cbafde82cc57293e00679d4f86c2.zip |
verifier: update to support certificates using SHA-256
(cherry picked from commit bac7fba02763ae5e78e8e4ba0bea727330ad953e)
Change-Id: I01c38d7fea088622a8b0bbf2c833fa2d969417af
Diffstat (limited to 'verifier.h')
-rw-r--r-- | verifier.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -19,12 +19,17 @@ #include "mincrypt/rsa.h" +typedef struct Certificate { + int hash_len; // SHA_DIGEST_SIZE (SHA-1) or SHA256_DIGEST_SIZE (SHA-256) + RSAPublicKey* public_key; +} Certificate; + /* Look in the file for a signature footer, and verify that it * matches one of the given keys. Return one of the constants below. */ -int verify_file(const char* path, const RSAPublicKey *pKeys, unsigned int numKeys); +int verify_file(const char* path, const Certificate *pKeys, unsigned int numKeys); -RSAPublicKey* load_keys(const char* filename, int* numKeys); +Certificate* load_keys(const char* filename, int* numKeys); #define VERIFY_SUCCESS 0 #define VERIFY_FAILURE 1 |