Fix the length of the extracted BCC

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

Test: build and run extraction tool
Bug: 237029566
Change-Id: I41f39cb72bb1dc27d6d40f3c5ace5265271aab0e
This commit is contained in:
Cong Lin
2022-07-06 09:50:04 -07:00
parent 1c96d290bd
commit 1f4385424e

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);
}