Fix the length of the extracted BCC

After a successful extraction, the vector of BCC should be resized to
the correct value.

This CL picks the change from http://ag/19196496, which fixes the bcc
size for our internal extraction tool.

Test: build and run extraction tool
Bug: 237029566
Change-Id: I0c73861e363215486a93abebac84da2ce49d43a8
This commit is contained in:
Cong Lin
2022-08-01 10:30:39 -07:00
parent ab5fd42968
commit 2dfc3171f7

View File

@@ -114,6 +114,7 @@ OEMCryptoResult OEMCryptoInterface::GetBcc(std::vector<uint8_t>& bcc) {
result = GetBootCertificateChain(bcc.data(), &bcc_size,
additional_signature.data(),
&additional_signature_size);
if (result == OEMCrypto_SUCCESS) bcc.resize(bcc_size);
LOGI("GetBootCertificateChain second attempt result %d", result);
}