]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_codesigning/lib/sigblob.cpp
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_codesigning / lib / sigblob.cpp
index 6e7cf0285319e2ef9398677b6979ba8fdd14d11e..ecac7081deb6c68bdaf74de6018af95b59e996fa 100644 (file)
@@ -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)