summaryrefslogtreecommitdiffstats
path: root/install.h
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-11-20 05:24:59 +0100
committerEthan Yonker <dees_troy@teamw.in>2016-11-30 04:27:39 +0100
commitb523650c8ecb6751409120a38e52a66a3e48753f (patch)
tree895e254cec518caaefc251950df604c0db0e8381 /install.h
parentFix libcrypto dependency in 6.0 trees (diff)
parentmerge in nyc-dr1-release history after reset to nyc-dr1-dev (diff)
downloadandroid_bootable_recovery-b523650c8ecb6751409120a38e52a66a3e48753f.tar
android_bootable_recovery-b523650c8ecb6751409120a38e52a66a3e48753f.tar.gz
android_bootable_recovery-b523650c8ecb6751409120a38e52a66a3e48753f.tar.bz2
android_bootable_recovery-b523650c8ecb6751409120a38e52a66a3e48753f.tar.lz
android_bootable_recovery-b523650c8ecb6751409120a38e52a66a3e48753f.tar.xz
android_bootable_recovery-b523650c8ecb6751409120a38e52a66a3e48753f.tar.zst
android_bootable_recovery-b523650c8ecb6751409120a38e52a66a3e48753f.zip
Diffstat (limited to '')
-rw-r--r--install.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/install.h b/install.h
index b4655dfab..14de22556 100644
--- a/install.h
+++ b/install.h
@@ -17,12 +17,10 @@
#ifndef RECOVERY_INSTALL_H_
#define RECOVERY_INSTALL_H_
-#include "common.h"
-#include "mincrypt/rsa.h"
+#include <string>
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "common.h"
+#include "minzip/Zip.h"
enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SKIPPED,
INSTALL_RETRY };
@@ -32,10 +30,12 @@ enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SK
int install_package(const char* root_path, bool* wipe_cache, const char* install_file,
bool needs_mount, int retry_count);
-RSAPublicKey* load_keys(const char* filename, int* numKeys);
+// Verify the package by ota keys. Return true if the package is verified successfully,
+// otherwise return false.
+bool verify_package(const unsigned char* package_data, size_t package_size);
-#ifdef __cplusplus
-}
-#endif
+// Read meta data file of the package, write its content in the string pointed by meta_data.
+// Return true if succeed, otherwise return false.
+bool read_metadata_from_package(ZipArchive* zip, std::string* meta_data);
#endif // RECOVERY_INSTALL_H_