Fix bcc length for printing

[ Merge of http://go/wvgerrit/194310 ]

Resize bcc to the correct length to eliminate the trailing zeros.

Bug: 330645490
Test: core unit tests

Change-Id: I56b6d30120735a4d7a0f39f29a9f255bd2d2d18c
This commit is contained in:
Cong Lin
2024-03-14 10:20:08 -07:00
committed by Rahul Frias
parent 882c80783b
commit 5e186dcfa6

View File

@@ -185,6 +185,7 @@ std::string ProvisioningHolder::DumpProvAttempt(const std::string& request,
if (result != OEMCrypto_SUCCESS) { if (result != OEMCrypto_SUCCESS) {
info << "--- ERROR GETTING BCC. result=" << result; info << "--- ERROR GETTING BCC. result=" << result;
} else { } else {
bcc.resize(bcc_length);
info << "BCC = (len=" << bcc_length << ") " info << "BCC = (len=" << bcc_length << ") "
<< wvutil::unlimited_b2a_hex(bcc) << "\n" << wvutil::unlimited_b2a_hex(bcc) << "\n"
<< "Additional Sig = (len=" << signature_length << ") " << "Additional Sig = (len=" << signature_length << ") "