Go to the documentation of this file.
16#ifndef LIEF_MACHO_CODE_SIGNATURE_DIR_COMMAND_H
17#define LIEF_MACHO_CODE_SIGNATURE_DIR_COMMAND_H
33struct linkedit_data_command;
37 friend class BinaryParser;
39 friend class LinkEdit;
45 CodeSignatureDir&
operator=(
const CodeSignatureDir& copy) =
default;
48 std::unique_ptr<LoadCommand>
clone()
const override {
49 return std::unique_ptr<CodeSignatureDir>(
new CodeSignatureDir(*
this));
63 data_offset_ = offset;
80 void accept(Visitor& visitor)
const override;
82 std::ostream&
print(std::ostream& os)
const override;
84 static bool classof(
const LoadCommand* cmd) {
85 return cmd->
command() == LoadCommand::TYPE::DYLIB_CODE_SIGN_DRS;
89 uint32_t data_offset_ = 0;
90 uint32_t data_size_ = 0;
91 span<uint8_t> content_;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:74
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:57
Definition CodeSignatureDir.hpp:36
uint32_t data_offset() const
Offset in the binary where the signature starts.
Definition CodeSignatureDir.hpp:53
CodeSignatureDir()=default
CodeSignatureDir(const CodeSignatureDir ©)=default
span< const uint8_t > content() const
Definition CodeSignatureDir.hpp:70
CodeSignatureDir & operator=(const CodeSignatureDir ©)=default
std::ostream & print(std::ostream &os) const override
static bool classof(const LoadCommand *cmd)
Definition CodeSignatureDir.hpp:84
uint32_t data_size() const
Size of the raw signature.
Definition CodeSignatureDir.hpp:58
CodeSignatureDir(const details::linkedit_data_command &cmd)
void data_size(uint32_t size)
Definition CodeSignatureDir.hpp:66
span< uint8_t > content()
Definition CodeSignatureDir.hpp:74
std::unique_ptr< LoadCommand > clone() const override
Definition CodeSignatureDir.hpp:48
void accept(Visitor &visitor) const override
~CodeSignatureDir() override=default
void data_offset(uint32_t offset)
Definition CodeSignatureDir.hpp:62
Definition LinkEdit.hpp:42
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:37
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:124
Definition endianness_support.hpp:59
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41