From 76fdb2419bfec0e747db2530379484a3dc571f34 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 20 Mar 2017 17:09:13 -0700 Subject: verify_file: Add constness to a few addresses. We should not touch any data while verifying packages (or parsing the in-memory ASN.1 structures). Test: mmma bootable/recovery Test: recovery_component_test passes. Test: recovery_unit_test passes. Change-Id: Ie990662c6451ec066a1807b3081c9296afbdb0bf --- verifier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'verifier.h') diff --git a/verifier.h b/verifier.h index 067dab554..6bee74947 100644 --- a/verifier.h +++ b/verifier.h @@ -65,7 +65,7 @@ struct Certificate { * given keys. It optionally accepts a callback function for posting the progress to. Returns one * of the constants of VERIFY_SUCCESS and VERIFY_FAILURE. */ -int verify_file(unsigned char* addr, size_t length, const std::vector& keys, +int verify_file(const unsigned char* addr, size_t length, const std::vector& keys, const std::function& set_progress = nullptr); bool load_keys(const char* filename, std::vector& certs); -- cgit v1.2.3