summaryrefslogtreecommitdiffstats
path: root/verifier.h
diff options
context:
space:
mode:
Diffstat (limited to 'verifier.h')
-rw-r--r--verifier.h6
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