Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Dec 3, 2023
1 parent fac0e78 commit 3aa5497
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 115 deletions.
26 changes: 0 additions & 26 deletions api/python/src/PE/objects/signature/pySignature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,6 @@ void create<Signature>(nb::module_& m) {
.value("CERT_EXPIRED", Signature::VERIFICATION_FLAGS::CERT_EXPIRED)
.value("CERT_FUTURE", Signature::VERIFICATION_FLAGS::CERT_FUTURE);

verif_flags_enums
.def("__str__", [] (nb::object& self) {
auto flags = nb::cast<Signature::VERIFICATION_FLAGS>(self);
const nb::dict verif_flags_entries = self.attr("@entries");
if (flags == Signature::VERIFICATION_FLAGS::OK) {
return Signature::flag_to_string(flags);
}

std::string flags_str;
for (const auto& item : verif_flags_entries) {
const auto& [value, info] = item;
auto enum_value = nb::cast<uint64_t>(value);
auto name = nb::cast<std::string>(info[0]);
auto flag = nb::cast<Signature::VERIFICATION_FLAGS>(info[2]);

//auto flag = nb::cast<Signature::VERIFICATION_FLAGS>(item.second[nb::int_(0)]);
if ((flags & flag) == flag && flag != Signature::VERIFICATION_FLAGS::OK) {
if (!flags_str.empty()) {
flags_str += " | ";
}
flags_str += "VERIFICATION_FLAGS." + name;
}
}
return flags_str;
});

enum_<Signature::VERIFICATION_CHECKS>(signature, "VERIFICATION_CHECKS", nb::is_arithmetic(),
R"delim(
Flags to tweak the verification process of the signature
Expand Down
89 changes: 0 additions & 89 deletions src/ELF/NoteDetails.cpp

This file was deleted.

0 comments on commit 3aa5497

Please sign in to comment.