diff --git a/api/python/src/PE/objects/signature/pySignature.cpp b/api/python/src/PE/objects/signature/pySignature.cpp index cff28a59a9..e97ed82d6a 100644 --- a/api/python/src/PE/objects/signature/pySignature.cpp +++ b/api/python/src/PE/objects/signature/pySignature.cpp @@ -54,32 +54,6 @@ void create(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(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(value); - auto name = nb::cast(info[0]); - auto flag = nb::cast(info[2]); - - //auto flag = nb::cast(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", nb::is_arithmetic(), R"delim( Flags to tweak the verification process of the signature diff --git a/src/ELF/NoteDetails.cpp b/src/ELF/NoteDetails.cpp deleted file mode 100644 index 2f8066d645..0000000000 --- a/src/ELF/NoteDetails.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright 2017 - 2023 R. Thomas - * Copyright 2017 - 2023 Quarkslab - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include - -#include "LIEF/ELF/hash.hpp" - -#include "LIEF/ELF/NoteDetails.hpp" -#include "LIEF/ELF/Note.hpp" - -namespace LIEF { -namespace ELF { - -NoteDetails::~NoteDetails() = default; -NoteDetails::NoteDetails() = default; - -NoteDetails::NoteDetails(Note& note): - note_{¬e} -{} - -NoteDetails* NoteDetails::clone() const { - return new NoteDetails(*this); -} - -const Note::description_t& NoteDetails::description() const { - if (note_ == nullptr) { - return empty_; - } - return note_->description(); -} - -Note::description_t& NoteDetails::description() { - if (note_ == nullptr) { - return empty_; - } - return note_->description(); -} - - -Binary* NoteDetails::binary() { - return const_cast(static_cast(this)->binary()); -} - - -const Binary* NoteDetails::binary() const { - if (note_ == nullptr) { - return nullptr; - } - return note_->binary_; -} - -void NoteDetails::accept(Visitor& visitor) const { - visitor.visit(*this); -} - - - - - -void NoteDetails::dump(std::ostream&) const { -} - -void NoteDetails::parse() { -} - -void NoteDetails::build() { -} - - -std::ostream& operator<<(std::ostream& os, const NoteDetails& note) { - note.dump(os); - return os; - -} - -} // namespace ELF -} // namespace LIEF