X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/e3d460c9de4426da6c630c3ae3f46173a99f82d8..ce3c8656732c924baf7e88df75eab50891bdc471:/OSX/libsecurity_codesigning/lib/resources.cpp diff --git a/OSX/libsecurity_codesigning/lib/resources.cpp b/OSX/libsecurity_codesigning/lib/resources.cpp index 490b1e07..c1efa959 100644 --- a/OSX/libsecurity_codesigning/lib/resources.cpp +++ b/OSX/libsecurity_codesigning/lib/resources.cpp @@ -396,6 +396,8 @@ const Hashing::Byte *ResourceSeal::hash(CodeDirectory::HashAlgorithm type) const { std::string name = ResourceBuilder::hashName(type); CFTypeRef hash = CFDictionaryGetValue(mDict, CFTempString(name)); + if (hash == NULL) // pre-agility fallback + hash = CFDictionaryGetValue(mDict, CFSTR("hash")); if (hash == NULL || CFGetTypeID(hash) != CFDataGetTypeID()) MacOSError::throwMe(errSecCSResourcesInvalid); return CFDataGetBytePtr(CFDataRef(hash));