]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_codesigning/lib/bundlediskrep.cpp
Security-59306.61.1.tar.gz
[apple/security.git] / OSX / libsecurity_codesigning / lib / bundlediskrep.cpp
index 1aa31968cd206b8900f063ce260ec37977f9d9e0..7c4909702644b1685db09b6dac96f61e0f53336b 100644 (file)
@@ -717,6 +717,14 @@ size_t BundleDiskRep::pageSize(const SigningContext &ctx)
 // Takes an array of CFNumbers of errors to tolerate.
 //
 void BundleDiskRep::strictValidate(const CodeDirectory* cd, const ToleratedErrors& tolerated, SecCSFlags flags)
 // Takes an array of CFNumbers of errors to tolerate.
 //
 void BundleDiskRep::strictValidate(const CodeDirectory* cd, const ToleratedErrors& tolerated, SecCSFlags flags)
+{
+       strictValidateStructure(cd, tolerated, flags);
+       
+       // now strict-check the main executable (which won't be an app-like object)
+       mExecRep->strictValidate(cd, tolerated, flags & ~kSecCSRestrictToAppLike);
+}
+
+void BundleDiskRep::strictValidateStructure(const CodeDirectory* cd, const ToleratedErrors& tolerated, SecCSFlags flags)
 {
        // scan our metadirectory (_CodeSignature) for unwanted guests
        if (!(flags & kSecCSQuickCheck))
 {
        // scan our metadirectory (_CodeSignature) for unwanted guests
        if (!(flags & kSecCSQuickCheck))
@@ -736,9 +744,6 @@ void BundleDiskRep::strictValidate(const CodeDirectory* cd, const ToleratedError
                if (!mAppLike)
                        if (tolerated.find(kSecCSRestrictToAppLike) == tolerated.end())
                                MacOSError::throwMe(errSecCSNotAppLike);
                if (!mAppLike)
                        if (tolerated.find(kSecCSRestrictToAppLike) == tolerated.end())
                                MacOSError::throwMe(errSecCSNotAppLike);
-       
-       // now strict-check the main executable (which won't be an app-like object)
-       mExecRep->strictValidate(cd, tolerated, flags & ~kSecCSRestrictToAppLike);
 }
 
 void BundleDiskRep::recordStrictError(OSStatus error)
 }
 
 void BundleDiskRep::recordStrictError(OSStatus error)