libavb: Mark data const when calculating vbmeta hash
Update the signature of avb_slot_verify_data_calculate_vbmeta_digest()
to show that it only uses the AvbSlotVerifyData as an input. This lets
it be used when the client has a const pointer to AvbSlotVerifyData.
Test: atest --host --host-unit-test-only --test-mapping external/avb
Change-Id: I384d45ba417f3d60122fbba96ed2512a46a65c29
diff --git a/libavb/avb_slot_verify.c b/libavb/avb_slot_verify.c
index 6a2745a..b1478b4 100644
--- a/libavb/avb_slot_verify.c
+++ b/libavb/avb_slot_verify.c
@@ -1706,7 +1706,7 @@
return ret;
}
-void avb_slot_verify_data_calculate_vbmeta_digest(AvbSlotVerifyData* data,
+void avb_slot_verify_data_calculate_vbmeta_digest(const AvbSlotVerifyData* data,
AvbDigestType digest_type,
uint8_t* out_digest) {
bool ret = false;
diff --git a/libavb/avb_slot_verify.h b/libavb/avb_slot_verify.h
index 633e7da..5c2de1f 100644
--- a/libavb/avb_slot_verify.h
+++ b/libavb/avb_slot_verify.h
@@ -311,7 +311,7 @@
* in |out_digest| which must be large enough to hold a digest
* of the requested type.
*/
-void avb_slot_verify_data_calculate_vbmeta_digest(AvbSlotVerifyData* data,
+void avb_slot_verify_data_calculate_vbmeta_digest(const AvbSlotVerifyData* data,
AvbDigestType digest_type,
uint8_t* out_digest);