Move off the Next ZipString overload.
Bug: http://b/129068177 Test: treehugger Change-Id: I3c8f70b0d8cc5dc6b3b4439dbe0b9a5bd85003c4
This commit is contained in:
@@ -320,22 +320,21 @@ static std::vector<Certificate> IterateZipEntriesAndSearchForKeys(const ZipArchi
|
||||
|
||||
std::vector<Certificate> result;
|
||||
|
||||
ZipString name;
|
||||
std::string name;
|
||||
ZipEntry entry;
|
||||
while ((iter_status = Next(cookie, &entry, &name)) == 0) {
|
||||
std::vector<uint8_t> pem_content(entry.uncompressed_length);
|
||||
if (int32_t extract_status =
|
||||
ExtractToMemory(handle, &entry, pem_content.data(), pem_content.size());
|
||||
extract_status != 0) {
|
||||
LOG(ERROR) << "Failed to extract " << std::string(name.name, name.name + name.name_length);
|
||||
LOG(ERROR) << "Failed to extract " << name;
|
||||
return {};
|
||||
}
|
||||
|
||||
Certificate cert(0, Certificate::KEY_TYPE_RSA, nullptr, nullptr);
|
||||
// Aborts the parsing if we fail to load one of the key file.
|
||||
if (!LoadCertificateFromBuffer(pem_content, &cert)) {
|
||||
LOG(ERROR) << "Failed to load keys from "
|
||||
<< std::string(name.name, name.name + name.name_length);
|
||||
LOG(ERROR) << "Failed to load keys from " << name;
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user