summaryrefslogtreecommitdiffstats
path: root/verifier.h
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2018-10-19 02:59:17 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-10-19 02:59:17 +0200
commit93cf8bb309dde92a97552d39287d7cfc1af0d0cf (patch)
treef67305610f0cf98f1b780af9d554c7b2e564004d /verifier.h
parentMerge "uncrypt: fix ioctl direction for F2FS_IOC_GET_PIN_FILE" am: b5564f37be (diff)
parentMerge "Load X509 keys from ziparchive" (diff)
downloadandroid_bootable_recovery-93cf8bb309dde92a97552d39287d7cfc1af0d0cf.tar
android_bootable_recovery-93cf8bb309dde92a97552d39287d7cfc1af0d0cf.tar.gz
android_bootable_recovery-93cf8bb309dde92a97552d39287d7cfc1af0d0cf.tar.bz2
android_bootable_recovery-93cf8bb309dde92a97552d39287d7cfc1af0d0cf.tar.lz
android_bootable_recovery-93cf8bb309dde92a97552d39287d7cfc1af0d0cf.tar.xz
android_bootable_recovery-93cf8bb309dde92a97552d39287d7cfc1af0d0cf.tar.zst
android_bootable_recovery-93cf8bb309dde92a97552d39287d7cfc1af0d0cf.zip
Diffstat (limited to 'verifier.h')
-rw-r--r--verifier.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/verifier.h b/verifier.h
index b13424126..b7924c71f 100644
--- a/verifier.h
+++ b/verifier.h
@@ -76,6 +76,10 @@ bool load_keys(const char* filename, std::vector<Certificate>& certs);
// false if there is a parsing failure or the signature's encryption algorithm is not supported.
bool LoadCertificateFromBuffer(const std::vector<uint8_t>& pem_content, Certificate* cert);
+// Iterates over the zip entries with the suffix "x509.pem" and returns a list of recognized
+// certificates. Returns an empty list if we fail to parse any of the entries.
+std::vector<Certificate> LoadKeysFromZipfile(const std::string& zip_name);
+
#define VERIFY_SUCCESS 0
#define VERIFY_FAILURE 1