Switch ListVal to store IntrusivePtrs

* Deprecates ListVal::Index() methods and replaces with ListVal::Idx()

* Replaces ListVal::Vals() method with one that returns
  std::vector<IntrusivePtr<Val>> rather than val_list
This commit is contained in:
Jon Siwek 2020-05-05 14:13:14 -07:00
parent b422f68b88
commit 5f57ceb70a
19 changed files with 111 additions and 100 deletions

View file

@ -249,8 +249,8 @@ X509_STORE* file_analysis::X509::GetRootStore(TableVal* root_certs)
// Build the validation store
for ( int i = 0; i < idxs->Length(); ++i )
{
Val* key = idxs->Index(i);
StringVal *sv = root_certs->Lookup(key)->AsStringVal();
const auto& key = idxs->Idx(i);
StringVal *sv = root_certs->Lookup(key.get())->AsStringVal();
assert(sv);
const uint8_t* data = sv->Bytes();
::X509* x = d2i_X509(NULL, &data, sv->Len());