#include "filediskrep.h"
#include "bundlediskrep.h"
#include "slcrep.h"
-
+#if TARGET_OS_OSX
+#include "diskimagerep.h"
+#endif
namespace Security {
namespace CodeSigning {
AutoFileDesc fd(path, O_RDONLY);
if (MachORep::candidate(fd))
return new MachORep(path, ctx);
+#if TARGET_OS_OSX
+ if (DiskImageRep::candidate(fd))
+ return new DiskImageRep(path);
+#endif
if (DYLDCacheRep::candidate(fd))
return new DYLDCacheRep(path);
{
// do nothing
}
+
+void DiskRep::prepareForSigning(SigningContext &state)
+{
+ // do nothing
+}
Universal *DiskRep::mainExecutableImage()
{
return 0; // whole file (start at beginning)
}
+size_t DiskRep::execSegBase(const Architecture *)
+{
+ return 0; // whole file (start at beginning)
+}
+
CFArrayRef DiskRep::modifiedFiles()
{
// by default, claim (just) the main executable modified
// nothing cached
}
+CFDictionaryRef DiskRep::diskRepInformation()
+{
+ return NULL;
+}
CFDictionaryRef DiskRep::defaultResourceRules(const SigningContext &)
{
}
-void DiskRep::strictValidate(const CodeDirectory*, const ToleratedErrors&)
+void DiskRep::strictValidate(const CodeDirectory*, const ToleratedErrors& tolerated, SecCSFlags flags)
{
- // do nothing
+ if (flags & kSecCSRestrictToAppLike)
+ if (tolerated.find(errSecCSNotAppLike) == tolerated.end())
+ MacOSError::throwMe(errSecCSNotAppLike);
}
CFArrayRef DiskRep::allowedResourceOmissions()