+
+#if 0 // rdar://problem/25720754
+ if ((signingFlags() & (kSecCSSignOpaque|kSecCSSignV1)) == 0 && builder.hashType() != kSecCodeSignatureHashSHA1) {
+ // calculate sorted list of top SuperBlob keys in this EmbeddedSignatureBlob (if any)
+ // (but not for opaque or V1 construction, which must remain bit-for-bit compatible)
+ std::vector<Endian<uint32_t> > slotVector;
+ slotVector.push_back(cdCodeDirectorySlot); // mandatory
+ std::set<CodeDirectory::Slot> filledSlots = builder.filledSpecialSlots();
+ filledSlots.insert(cdTopDirectorySlot); // will be added below
+ copy(filledSlots.begin(), filledSlots.end(), back_inserter(slotVector));
+ for (unsigned n = 0; n < alternateDigestCount; n++)
+ slotVector.push_back(cdAlternateCodeDirectorySlots + n);
+ slotVector.push_back(cdSignatureSlot);
+ CFTempData cfSlotVector(&slotVector[0], slotVector.size() * sizeof(slotVector[0]));
+ writer.component(cdTopDirectorySlot, cfSlotVector);
+ builder.specialSlot(cdTopDirectorySlot, cfSlotVector);
+ }
+#endif