INNER CODE UNIT · C++

type

trailofbits/uthenticode · src/uthenticode.cpp:461

    std::uint16_t type = *reinterpret_cast<std::uint16_t *>(current_wincert + offset);
    offset += sizeof(type);

    // Continue only we can satisfy the length
    if (current_wincert + length <= past_secdir && length > offset) {
      std::vector<std::uint8_t> cert_data(current_wincert + offset, current_wincert + length);

      certs.emplace_back(static_cast<certificate_revision>(revision),
                         static_cast<certificate_type>(type),
                         cert_data);
    }

    current_wincert += std::max<std::size_t>(round(length, 8), 8);
  }

  return certs;
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…