X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/90dc47c27df1983f6ebc252b0c4b94c8718fe52d..02b2aca600d4a0fe6fb259262bd6808ef889acde:/OSX/libsecurity_codesigning/lib/sigblob.cpp diff --git a/OSX/libsecurity_codesigning/lib/sigblob.cpp b/OSX/libsecurity_codesigning/lib/sigblob.cpp index 6e7cf028..ecac7081 100644 --- a/OSX/libsecurity_codesigning/lib/sigblob.cpp +++ b/OSX/libsecurity_codesigning/lib/sigblob.cpp @@ -34,17 +34,24 @@ namespace CodeSigning { CFDataRef EmbeddedSignatureBlob::component(CodeDirectory::SpecialSlot slot) const { - 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 { - MacOSError::throwMe(errSecCSSignatureInvalid); - } + const BlobCore *blob = this->find(slot); + + if (blob) { + return blobData(slot, blob); } return NULL; } + +CFDataRef EmbeddedSignatureBlob::blobData(CodeDirectory::SpecialSlot slot, BlobCore const *blob) +{ + if (CodeDirectory::slotAttributes(slot) & cdComponentIsBlob) { + return makeCFData(*blob); // is a native Blob + } else if (const BlobWrapper *wrap = BlobWrapper::specific(blob)) { + return makeCFData(*wrap); + } else { + MacOSError::throwMe(errSecCSSignatureInvalid); + } +} void EmbeddedSignatureBlob::Maker::component(CodeDirectory::SpecialSlot slot, CFDataRef data)