diff options
author | Tianjie Xu <xunchang@google.com> | 2018-10-12 22:24:48 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-10-12 22:24:48 +0200 |
commit | ff89e0004f6a7533bfb8b8fa6d31895f5461a785 (patch) | |
tree | 91b764109a7320e38d4515bf76dcd24cd34344e6 /verifier.h | |
parent | Merge "recovery: deprecate check for ro.build.system_root_image" (diff) | |
parent | Add function to load the key from x509.pem file (diff) | |
download | android_bootable_recovery-ff89e0004f6a7533bfb8b8fa6d31895f5461a785.tar android_bootable_recovery-ff89e0004f6a7533bfb8b8fa6d31895f5461a785.tar.gz android_bootable_recovery-ff89e0004f6a7533bfb8b8fa6d31895f5461a785.tar.bz2 android_bootable_recovery-ff89e0004f6a7533bfb8b8fa6d31895f5461a785.tar.lz android_bootable_recovery-ff89e0004f6a7533bfb8b8fa6d31895f5461a785.tar.xz android_bootable_recovery-ff89e0004f6a7533bfb8b8fa6d31895f5461a785.tar.zst android_bootable_recovery-ff89e0004f6a7533bfb8b8fa6d31895f5461a785.zip |
Diffstat (limited to 'verifier.h')
-rw-r--r-- | verifier.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/verifier.h b/verifier.h index 6fa8f2b0a..b13424126 100644 --- a/verifier.h +++ b/verifier.h @@ -17,6 +17,8 @@ #ifndef _RECOVERY_VERIFIER_H #define _RECOVERY_VERIFIER_H +#include <stdint.h> + #include <functional> #include <memory> #include <vector> @@ -70,6 +72,10 @@ int verify_file(const unsigned char* addr, size_t length, const std::vector<Cert bool load_keys(const char* filename, std::vector<Certificate>& certs); +// Parses a PEM-encoded x509 certificate from the given buffer and saves it into |cert|. Returns +// 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); + #define VERIFY_SUCCESS 0 #define VERIFY_FAILURE 1 |