X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/866f8763175ff60e4fa455b92b5eb660a12fe6c7..b54c578e17e9bcbd74aa30ea75e25e955b9a6205:/OSX/libsecurity_codesigning/lib/machorep.h diff --git a/OSX/libsecurity_codesigning/lib/machorep.h b/OSX/libsecurity_codesigning/lib/machorep.h index d30ba537..ef2181bb 100644 --- a/OSX/libsecurity_codesigning/lib/machorep.h +++ b/OSX/libsecurity_codesigning/lib/machorep.h @@ -45,12 +45,13 @@ namespace CodeSigning { // that it's driven directly from the signing code, with no // abstractions to get in the way. // -class MachORep : public SingleDiskRep { +class MachORep : public SingleDiskRep, public EditableDiskRep { public: MachORep(const char *path, const Context *ctx = NULL); virtual ~MachORep(); CFDataRef component(CodeDirectory::SpecialSlot slot); + RawComponentMap createRawComponents(); CFDataRef identification(); Universal *mainExecutableImage(); void prepareForSigning(SigningContext &context); @@ -68,7 +69,7 @@ public: void strictValidate(const CodeDirectory* cd, const ToleratedErrors& tolerated, SecCSFlags flags); void flush(); // flush cache - + static bool candidate(UnixPlusPlus::FileDesc &fd); public: @@ -86,9 +87,10 @@ protected: private: static bool needsExecSeg(const MachO& macho); + EmbeddedSignatureBlob *signingData(); Universal *mExecutable; // cached Mach-O/Universal reference to mainExecutablePath() - EmbeddedSignatureBlob *mSigningData; // cached signing data from current architecture + mutable EmbeddedSignatureBlob *mSigningData; // cached signing data from current architecture };