summaryrefslogtreecommitdiffstats
path: root/verifier.h
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2013-04-10 20:32:17 +0200
committerDoug Zongker <dougz@android.com>2013-04-10 20:32:17 +0200
commitbac7fba02763ae5e78e8e4ba0bea727330ad953e (patch)
tree6056acf572fb45b4ff1ef2874b1d6373776a56c7 /verifier.h
parentam b5bd4fb7: (-s ours) am 2f50df00: am c09444eb: am f91bd41c: am 1c302caf: (-s ours) am c14a7fbd: (-s ours) Reconcile with jb-mr1-release - do not merge (diff)
downloadandroid_bootable_recovery-bac7fba02763ae5e78e8e4ba0bea727330ad953e.tar
android_bootable_recovery-bac7fba02763ae5e78e8e4ba0bea727330ad953e.tar.gz
android_bootable_recovery-bac7fba02763ae5e78e8e4ba0bea727330ad953e.tar.bz2
android_bootable_recovery-bac7fba02763ae5e78e8e4ba0bea727330ad953e.tar.lz
android_bootable_recovery-bac7fba02763ae5e78e8e4ba0bea727330ad953e.tar.xz
android_bootable_recovery-bac7fba02763ae5e78e8e4ba0bea727330ad953e.tar.zst
android_bootable_recovery-bac7fba02763ae5e78e8e4ba0bea727330ad953e.zip
Diffstat (limited to '')
-rw-r--r--verifier.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/verifier.h b/verifier.h
index e9ef3b722..6ce1b44d1 100644
--- a/verifier.h
+++ b/verifier.h
@@ -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