// sigblob - signature (Super)Blob types
//
#include "sigblob.h"
+#include "CSCommon.h"
namespace Security {
if (const BlobCore *blob = this->find(slot))
if (CodeDirectory::slotAttributes(slot) & cdComponentIsBlob)
return makeCFData(*blob); // is a native Blob
+ else if (const BlobWrapper *wrap = BlobWrapper::specific(blob))
+ return makeCFData(*wrap);
else
- return makeCFData(*BlobWrapper::specific(blob)); // unwrap payload
+ MacOSError::throwMe(errSecCSSignatureInvalid);
return NULL;
}
}
+CFDictionaryRef EntitlementBlob::entitlements() const
+{
+ return makeCFDictionaryFrom(this->at<const UInt8 *>(sizeof(EntitlementBlob)),
+ this->length() - sizeof(EntitlementBlob));
+}
+
+
} // end namespace CodeSigning
} // end namespace Security