summaryrefslogtreecommitdiffstats
path: root/verifier.h
diff options
context:
space:
mode:
authorKenny Root <kroot@android.com>2013-09-25 19:14:59 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-09-25 19:14:59 +0200
commit58c60900ac3682fab08f64373bdd1020713b48f7 (patch)
tree47f9585d4cd72de8a3fb935d8e8387763ce3a9b1 /verifier.h
parentMerge "Update libpng API usage" (diff)
parentverifier: update to support certificates using SHA-256 (diff)
downloadandroid_bootable_recovery-58c60900ac3682fab08f64373bdd1020713b48f7.tar
android_bootable_recovery-58c60900ac3682fab08f64373bdd1020713b48f7.tar.gz
android_bootable_recovery-58c60900ac3682fab08f64373bdd1020713b48f7.tar.bz2
android_bootable_recovery-58c60900ac3682fab08f64373bdd1020713b48f7.tar.lz
android_bootable_recovery-58c60900ac3682fab08f64373bdd1020713b48f7.tar.xz
android_bootable_recovery-58c60900ac3682fab08f64373bdd1020713b48f7.tar.zst
android_bootable_recovery-58c60900ac3682fab08f64373bdd1020713b48f7.zip
Diffstat (limited to 'verifier.h')
-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