Bill Garrison avatar Bill Garrison committed 8463ae2

Mods to compile xar under iOS 5.

Comments (0)

Files changed (10)

xar-ios.xcodeproj/project.pbxproj

+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		F20313331532538E00FE7B69 /* appledouble.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313011532538E00FE7B69 /* appledouble.h */; };
+		F20313341532538E00FE7B69 /* archive.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313021532538E00FE7B69 /* archive.c */; };
+		F20313351532538E00FE7B69 /* archive.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313031532538E00FE7B69 /* archive.h */; };
+		F20313361532538E00FE7B69 /* arcmod.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313041532538E00FE7B69 /* arcmod.c */; };
+		F20313371532538E00FE7B69 /* arcmod.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313051532538E00FE7B69 /* arcmod.h */; };
+		F20313381532538E00FE7B69 /* asprintf.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313061532538E00FE7B69 /* asprintf.h */; };
+		F20313391532538E00FE7B69 /* b64.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313071532538E00FE7B69 /* b64.c */; };
+		F203133A1532538E00FE7B69 /* b64.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313081532538E00FE7B69 /* b64.h */; };
+		F203133B1532538E00FE7B69 /* bzxar.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313091532538E00FE7B69 /* bzxar.c */; };
+		F203133C1532538E00FE7B69 /* bzxar.h in Headers */ = {isa = PBXBuildFile; fileRef = F203130A1532538E00FE7B69 /* bzxar.h */; };
+		F203133D1532538E00FE7B69 /* darwinattr.c in Sources */ = {isa = PBXBuildFile; fileRef = F203130B1532538E00FE7B69 /* darwinattr.c */; };
+		F203133E1532538E00FE7B69 /* darwinattr.h in Headers */ = {isa = PBXBuildFile; fileRef = F203130C1532538E00FE7B69 /* darwinattr.h */; };
+		F203133F1532538E00FE7B69 /* data.c in Sources */ = {isa = PBXBuildFile; fileRef = F203130D1532538E00FE7B69 /* data.c */; };
+		F20313401532538E00FE7B69 /* data.h in Headers */ = {isa = PBXBuildFile; fileRef = F203130E1532538E00FE7B69 /* data.h */; };
+		F20313411532538E00FE7B69 /* ea.c in Sources */ = {isa = PBXBuildFile; fileRef = F203130F1532538E00FE7B69 /* ea.c */; };
+		F20313421532538E00FE7B69 /* ea.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313101532538E00FE7B69 /* ea.h */; };
+		F20313431532538E00FE7B69 /* err.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313111532538E00FE7B69 /* err.c */; };
+		F20313441532538E00FE7B69 /* ext2.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313121532538E00FE7B69 /* ext2.c */; };
+		F20313451532538E00FE7B69 /* ext2.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313131532538E00FE7B69 /* ext2.h */; };
+		F20313461532538E00FE7B69 /* fbsdattr.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313141532538E00FE7B69 /* fbsdattr.c */; };
+		F20313471532538E00FE7B69 /* fbsdattr.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313151532538E00FE7B69 /* fbsdattr.h */; };
+		F20313481532538E00FE7B69 /* filetree.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313161532538E00FE7B69 /* filetree.c */; };
+		F20313491532538E00FE7B69 /* filetree.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313171532538E00FE7B69 /* filetree.h */; };
+		F203134A1532538E00FE7B69 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313181532538E00FE7B69 /* hash.c */; };
+		F203134B1532538E00FE7B69 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313191532538E00FE7B69 /* hash.h */; };
+		F203134C1532538E00FE7B69 /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = F203131A1532538E00FE7B69 /* io.c */; };
+		F203134D1532538E00FE7B69 /* io.h in Headers */ = {isa = PBXBuildFile; fileRef = F203131B1532538E00FE7B69 /* io.h */; };
+		F203134E1532538E00FE7B69 /* linuxattr.c in Sources */ = {isa = PBXBuildFile; fileRef = F203131E1532538E00FE7B69 /* linuxattr.c */; };
+		F203134F1532538E00FE7B69 /* linuxattr.h in Headers */ = {isa = PBXBuildFile; fileRef = F203131F1532538E00FE7B69 /* linuxattr.h */; };
+		F20313501532538E00FE7B69 /* lzmaxar.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313201532538E00FE7B69 /* lzmaxar.c */; };
+		F20313511532538E00FE7B69 /* lzmaxar.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313211532538E00FE7B69 /* lzmaxar.h */; };
+		F20313521532538E00FE7B69 /* macho.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313221532538E00FE7B69 /* macho.c */; };
+		F20313531532538E00FE7B69 /* macho.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313231532538E00FE7B69 /* macho.h */; };
+		F20313551532538E00FE7B69 /* script.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313261532538E00FE7B69 /* script.c */; };
+		F20313561532538E00FE7B69 /* script.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313271532538E00FE7B69 /* script.h */; };
+		F20313571532538E00FE7B69 /* signature.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313281532538E00FE7B69 /* signature.c */; };
+		F20313581532538E00FE7B69 /* signature.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313291532538E00FE7B69 /* signature.h */; };
+		F20313591532538E00FE7B69 /* stat.c in Sources */ = {isa = PBXBuildFile; fileRef = F203132A1532538E00FE7B69 /* stat.c */; };
+		F203135A1532538E00FE7B69 /* stat.h in Headers */ = {isa = PBXBuildFile; fileRef = F203132B1532538E00FE7B69 /* stat.h */; };
+		F203135B1532538E00FE7B69 /* strmode.h in Headers */ = {isa = PBXBuildFile; fileRef = F203132C1532538E00FE7B69 /* strmode.h */; };
+		F203135C1532538E00FE7B69 /* subdoc.c in Sources */ = {isa = PBXBuildFile; fileRef = F203132D1532538E00FE7B69 /* subdoc.c */; };
+		F203135D1532538E00FE7B69 /* subdoc.h in Headers */ = {isa = PBXBuildFile; fileRef = F203132E1532538E00FE7B69 /* subdoc.h */; };
+		F203135E1532538E00FE7B69 /* util.c in Sources */ = {isa = PBXBuildFile; fileRef = F203132F1532538E00FE7B69 /* util.c */; };
+		F203135F1532538E00FE7B69 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313301532538E00FE7B69 /* util.h */; };
+		F20313601532538E00FE7B69 /* zxar.c in Sources */ = {isa = PBXBuildFile; fileRef = F20313311532538E00FE7B69 /* zxar.c */; };
+		F20313611532538E00FE7B69 /* zxar.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313321532538E00FE7B69 /* zxar.h */; };
+		F2031363153253C800FE7B69 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F2031362153253C800FE7B69 /* libxml2.dylib */; };
+		F203136E1532714C00FE7B69 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = F20313691532714C00FE7B69 /* config.h */; };
+		F203136F1532714C00FE7B69 /* xar.h in Headers */ = {isa = PBXBuildFile; fileRef = F203136B1532714C00FE7B69 /* xar.h */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		F203128215324B0D00FE7B69 /* libxar-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libxar-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+		F20313011532538E00FE7B69 /* appledouble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = appledouble.h; sourceTree = "<group>"; };
+		F20313021532538E00FE7B69 /* archive.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = archive.c; sourceTree = "<group>"; };
+		F20313031532538E00FE7B69 /* archive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = archive.h; sourceTree = "<group>"; };
+		F20313041532538E00FE7B69 /* arcmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = arcmod.c; sourceTree = "<group>"; };
+		F20313051532538E00FE7B69 /* arcmod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = arcmod.h; sourceTree = "<group>"; };
+		F20313061532538E00FE7B69 /* asprintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asprintf.h; sourceTree = "<group>"; };
+		F20313071532538E00FE7B69 /* b64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b64.c; sourceTree = "<group>"; };
+		F20313081532538E00FE7B69 /* b64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b64.h; sourceTree = "<group>"; };
+		F20313091532538E00FE7B69 /* bzxar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bzxar.c; sourceTree = "<group>"; };
+		F203130A1532538E00FE7B69 /* bzxar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bzxar.h; sourceTree = "<group>"; };
+		F203130B1532538E00FE7B69 /* darwinattr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = darwinattr.c; sourceTree = "<group>"; };
+		F203130C1532538E00FE7B69 /* darwinattr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = darwinattr.h; sourceTree = "<group>"; };
+		F203130D1532538E00FE7B69 /* data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = data.c; sourceTree = "<group>"; };
+		F203130E1532538E00FE7B69 /* data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = data.h; sourceTree = "<group>"; };
+		F203130F1532538E00FE7B69 /* ea.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea.c; sourceTree = "<group>"; };
+		F20313101532538E00FE7B69 /* ea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ea.h; sourceTree = "<group>"; };
+		F20313111532538E00FE7B69 /* err.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = err.c; sourceTree = "<group>"; };
+		F20313121532538E00FE7B69 /* ext2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ext2.c; sourceTree = "<group>"; };
+		F20313131532538E00FE7B69 /* ext2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ext2.h; sourceTree = "<group>"; };
+		F20313141532538E00FE7B69 /* fbsdattr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fbsdattr.c; sourceTree = "<group>"; };
+		F20313151532538E00FE7B69 /* fbsdattr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fbsdattr.h; sourceTree = "<group>"; };
+		F20313161532538E00FE7B69 /* filetree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = filetree.c; sourceTree = "<group>"; };
+		F20313171532538E00FE7B69 /* filetree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = filetree.h; sourceTree = "<group>"; };
+		F20313181532538E00FE7B69 /* hash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hash.c; sourceTree = "<group>"; };
+		F20313191532538E00FE7B69 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hash.h; sourceTree = "<group>"; };
+		F203131A1532538E00FE7B69 /* io.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = io.c; sourceTree = "<group>"; };
+		F203131B1532538E00FE7B69 /* io.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = io.h; sourceTree = "<group>"; };
+		F203131E1532538E00FE7B69 /* linuxattr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = linuxattr.c; sourceTree = "<group>"; };
+		F203131F1532538E00FE7B69 /* linuxattr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linuxattr.h; sourceTree = "<group>"; };
+		F20313201532538E00FE7B69 /* lzmaxar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lzmaxar.c; sourceTree = "<group>"; };
+		F20313211532538E00FE7B69 /* lzmaxar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lzmaxar.h; sourceTree = "<group>"; };
+		F20313221532538E00FE7B69 /* macho.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = macho.c; sourceTree = "<group>"; };
+		F20313231532538E00FE7B69 /* macho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macho.h; sourceTree = "<group>"; };
+		F20313261532538E00FE7B69 /* script.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = script.c; sourceTree = "<group>"; };
+		F20313271532538E00FE7B69 /* script.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = script.h; sourceTree = "<group>"; };
+		F20313281532538E00FE7B69 /* signature.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = signature.c; sourceTree = "<group>"; };
+		F20313291532538E00FE7B69 /* signature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = signature.h; sourceTree = "<group>"; };
+		F203132A1532538E00FE7B69 /* stat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stat.c; sourceTree = "<group>"; };
+		F203132B1532538E00FE7B69 /* stat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stat.h; sourceTree = "<group>"; };
+		F203132C1532538E00FE7B69 /* strmode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strmode.h; sourceTree = "<group>"; };
+		F203132D1532538E00FE7B69 /* subdoc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = subdoc.c; sourceTree = "<group>"; };
+		F203132E1532538E00FE7B69 /* subdoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = subdoc.h; sourceTree = "<group>"; };
+		F203132F1532538E00FE7B69 /* util.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = util.c; sourceTree = "<group>"; };
+		F20313301532538E00FE7B69 /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = "<group>"; };
+		F20313311532538E00FE7B69 /* zxar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zxar.c; sourceTree = "<group>"; };
+		F20313321532538E00FE7B69 /* zxar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zxar.h; sourceTree = "<group>"; };
+		F2031362153253C800FE7B69 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
+		F20313691532714C00FE7B69 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+		F203136B1532714C00FE7B69 /* xar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xar.h; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		F203127F15324B0D00FE7B69 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F2031363153253C800FE7B69 /* libxml2.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		F203127715324B0D00FE7B69 = {
+			isa = PBXGroup;
+			children = (
+				F203128715324B0D00FE7B69 /* xar-ios */,
+				F203128415324B0D00FE7B69 /* Frameworks */,
+				F203128315324B0D00FE7B69 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		F203128315324B0D00FE7B69 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				F203128215324B0D00FE7B69 /* libxar-ios.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		F203128415324B0D00FE7B69 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				F2031362153253C800FE7B69 /* libxml2.dylib */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		F203128715324B0D00FE7B69 /* xar-ios */ = {
+			isa = PBXGroup;
+			children = (
+				F20313681532714C00FE7B69 /* include */,
+				F20313001532538E00FE7B69 /* lib */,
+			);
+			path = "xar-ios";
+			sourceTree = "<group>";
+		};
+		F20313001532538E00FE7B69 /* lib */ = {
+			isa = PBXGroup;
+			children = (
+				F20313011532538E00FE7B69 /* appledouble.h */,
+				F20313021532538E00FE7B69 /* archive.c */,
+				F20313031532538E00FE7B69 /* archive.h */,
+				F20313041532538E00FE7B69 /* arcmod.c */,
+				F20313051532538E00FE7B69 /* arcmod.h */,
+				F20313061532538E00FE7B69 /* asprintf.h */,
+				F20313071532538E00FE7B69 /* b64.c */,
+				F20313081532538E00FE7B69 /* b64.h */,
+				F20313091532538E00FE7B69 /* bzxar.c */,
+				F203130A1532538E00FE7B69 /* bzxar.h */,
+				F203130B1532538E00FE7B69 /* darwinattr.c */,
+				F203130C1532538E00FE7B69 /* darwinattr.h */,
+				F203130D1532538E00FE7B69 /* data.c */,
+				F203130E1532538E00FE7B69 /* data.h */,
+				F203130F1532538E00FE7B69 /* ea.c */,
+				F20313101532538E00FE7B69 /* ea.h */,
+				F20313111532538E00FE7B69 /* err.c */,
+				F20313121532538E00FE7B69 /* ext2.c */,
+				F20313131532538E00FE7B69 /* ext2.h */,
+				F20313141532538E00FE7B69 /* fbsdattr.c */,
+				F20313151532538E00FE7B69 /* fbsdattr.h */,
+				F20313161532538E00FE7B69 /* filetree.c */,
+				F20313171532538E00FE7B69 /* filetree.h */,
+				F20313181532538E00FE7B69 /* hash.c */,
+				F20313191532538E00FE7B69 /* hash.h */,
+				F203131A1532538E00FE7B69 /* io.c */,
+				F203131B1532538E00FE7B69 /* io.h */,
+				F203131E1532538E00FE7B69 /* linuxattr.c */,
+				F203131F1532538E00FE7B69 /* linuxattr.h */,
+				F20313201532538E00FE7B69 /* lzmaxar.c */,
+				F20313211532538E00FE7B69 /* lzmaxar.h */,
+				F20313221532538E00FE7B69 /* macho.c */,
+				F20313231532538E00FE7B69 /* macho.h */,
+				F20313261532538E00FE7B69 /* script.c */,
+				F20313271532538E00FE7B69 /* script.h */,
+				F20313281532538E00FE7B69 /* signature.c */,
+				F20313291532538E00FE7B69 /* signature.h */,
+				F203132A1532538E00FE7B69 /* stat.c */,
+				F203132B1532538E00FE7B69 /* stat.h */,
+				F203132C1532538E00FE7B69 /* strmode.h */,
+				F203132D1532538E00FE7B69 /* subdoc.c */,
+				F203132E1532538E00FE7B69 /* subdoc.h */,
+				F203132F1532538E00FE7B69 /* util.c */,
+				F20313301532538E00FE7B69 /* util.h */,
+				F20313311532538E00FE7B69 /* zxar.c */,
+				F20313321532538E00FE7B69 /* zxar.h */,
+			);
+			name = lib;
+			path = xar/lib;
+			sourceTree = SOURCE_ROOT;
+		};
+		F20313681532714C00FE7B69 /* include */ = {
+			isa = PBXGroup;
+			children = (
+				F20313691532714C00FE7B69 /* config.h */,
+				F203136B1532714C00FE7B69 /* xar.h */,
+			);
+			name = include;
+			path = xar/include;
+			sourceTree = SOURCE_ROOT;
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		F203128015324B0D00FE7B69 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F20313331532538E00FE7B69 /* appledouble.h in Headers */,
+				F20313351532538E00FE7B69 /* archive.h in Headers */,
+				F20313371532538E00FE7B69 /* arcmod.h in Headers */,
+				F20313381532538E00FE7B69 /* asprintf.h in Headers */,
+				F203133A1532538E00FE7B69 /* b64.h in Headers */,
+				F203133C1532538E00FE7B69 /* bzxar.h in Headers */,
+				F203133E1532538E00FE7B69 /* darwinattr.h in Headers */,
+				F20313401532538E00FE7B69 /* data.h in Headers */,
+				F20313421532538E00FE7B69 /* ea.h in Headers */,
+				F20313451532538E00FE7B69 /* ext2.h in Headers */,
+				F20313471532538E00FE7B69 /* fbsdattr.h in Headers */,
+				F20313491532538E00FE7B69 /* filetree.h in Headers */,
+				F203134B1532538E00FE7B69 /* hash.h in Headers */,
+				F203134D1532538E00FE7B69 /* io.h in Headers */,
+				F203134F1532538E00FE7B69 /* linuxattr.h in Headers */,
+				F20313511532538E00FE7B69 /* lzmaxar.h in Headers */,
+				F20313531532538E00FE7B69 /* macho.h in Headers */,
+				F20313561532538E00FE7B69 /* script.h in Headers */,
+				F20313581532538E00FE7B69 /* signature.h in Headers */,
+				F203135A1532538E00FE7B69 /* stat.h in Headers */,
+				F203135B1532538E00FE7B69 /* strmode.h in Headers */,
+				F203135D1532538E00FE7B69 /* subdoc.h in Headers */,
+				F203135F1532538E00FE7B69 /* util.h in Headers */,
+				F20313611532538E00FE7B69 /* zxar.h in Headers */,
+				F203136E1532714C00FE7B69 /* config.h in Headers */,
+				F203136F1532714C00FE7B69 /* xar.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		F203128115324B0D00FE7B69 /* xar-ios */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = F203128F15324B0D00FE7B69 /* Build configuration list for PBXNativeTarget "xar-ios" */;
+			buildPhases = (
+				F203127E15324B0D00FE7B69 /* Sources */,
+				F203127F15324B0D00FE7B69 /* Frameworks */,
+				F203128015324B0D00FE7B69 /* Headers */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "xar-ios";
+			productName = "xar-ios";
+			productReference = F203128215324B0D00FE7B69 /* libxar-ios.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		F203127915324B0D00FE7B69 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0430;
+				ORGANIZATIONNAME = "Standard Orbit Software, LLC";
+			};
+			buildConfigurationList = F203127C15324B0D00FE7B69 /* Build configuration list for PBXProject "xar-ios" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+			);
+			mainGroup = F203127715324B0D00FE7B69;
+			productRefGroup = F203128315324B0D00FE7B69 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				F203128115324B0D00FE7B69 /* xar-ios */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		F203127E15324B0D00FE7B69 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F20313341532538E00FE7B69 /* archive.c in Sources */,
+				F20313361532538E00FE7B69 /* arcmod.c in Sources */,
+				F20313391532538E00FE7B69 /* b64.c in Sources */,
+				F203133B1532538E00FE7B69 /* bzxar.c in Sources */,
+				F203133D1532538E00FE7B69 /* darwinattr.c in Sources */,
+				F203133F1532538E00FE7B69 /* data.c in Sources */,
+				F20313411532538E00FE7B69 /* ea.c in Sources */,
+				F20313431532538E00FE7B69 /* err.c in Sources */,
+				F20313441532538E00FE7B69 /* ext2.c in Sources */,
+				F20313461532538E00FE7B69 /* fbsdattr.c in Sources */,
+				F20313481532538E00FE7B69 /* filetree.c in Sources */,
+				F203134A1532538E00FE7B69 /* hash.c in Sources */,
+				F203134C1532538E00FE7B69 /* io.c in Sources */,
+				F203134E1532538E00FE7B69 /* linuxattr.c in Sources */,
+				F20313501532538E00FE7B69 /* lzmaxar.c in Sources */,
+				F20313521532538E00FE7B69 /* macho.c in Sources */,
+				F20313551532538E00FE7B69 /* script.c in Sources */,
+				F20313571532538E00FE7B69 /* signature.c in Sources */,
+				F20313591532538E00FE7B69 /* stat.c in Sources */,
+				F203135C1532538E00FE7B69 /* subdoc.c in Sources */,
+				F203135E1532538E00FE7B69 /* util.c in Sources */,
+				F20313601532538E00FE7B69 /* zxar.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		F203128D15324B0D00FE7B69 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"xar/include/**",
+					"/usr/include/libxml2/**",
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		F203128E15324B0D00FE7B69 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				COPY_PHASE_STRIP = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"xar/include/**",
+					"/usr/include/libxml2/**",
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		F203129015324B0D00FE7B69 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DSTROOT = /tmp/xar_ios.dst;
+				OTHER_LDFLAGS = "-ObjC";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+			};
+			name = Debug;
+		};
+		F203129115324B0D00FE7B69 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DSTROOT = /tmp/xar_ios.dst;
+				OTHER_LDFLAGS = "-ObjC";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		F203127C15324B0D00FE7B69 /* Build configuration list for PBXProject "xar-ios" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				F203128D15324B0D00FE7B69 /* Debug */,
+				F203128E15324B0D00FE7B69 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		F203128F15324B0D00FE7B69 /* Build configuration list for PBXNativeTarget "xar-ios" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				F203129015324B0D00FE7B69 /* Debug */,
+				F203129115324B0D00FE7B69 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = F203127915324B0D00FE7B69 /* Project object */;
+}
+/*
+ * Copyright (c) 2005-2007 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun@synack.net>
+ */
+/*
+ * Portions Copyright 2006, Apple Computer, Inc.
+ * Christopher Ryan <ryanc@apple.com>
+ */
+
+
+#ifndef _XAR_ARCHIVE_H_
+#define _XAR_ARCHIVE_H_
+#include <zlib.h>
+#include <libxml/hash.h>
+#include <CommonCrypto/CommonDigest.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "xar.h"
+#include "filetree.h"
+
+struct errctx {
+	const char *str;
+	int         saved_errno;
+	xar_file_t  file;
+	void       *usrctx;
+	xar_t       x;
+};
+
+struct __xar_t {
+	xar_prop_t props;
+	xar_attr_t attrs;      /* archive options, such as rsize */
+	const char *prefix;
+	const char *ns;
+	const char *filler1;
+	const char *filler2;
+	xar_file_t files;       /* file forest */
+	const char *filename;   /* name of the archive we are operating on */
+	char *dirname;          /* directory of the archive, used in creation */
+	int fd;                 /* open file descriptor for the archive */
+	int heap_fd;            /* fd for tmp heap archive, used in creation */
+	off_t heap_offset;      /* current offset within the heap */
+	off_t heap_len;         /* current length of the heap */
+	xar_header_t header;    /* header of the xar archive */
+	void *readbuf;          /* buffer for reading/writing compressed toc */
+	size_t readbuf_len;     /* length of readbuf */
+	size_t offset;          /* offset into readbuf for keeping track between callbacks. */
+	size_t toc_count;       /* current bytes read of the toc */
+	z_stream zs;            /* gz state for compressing/decompressing toc */
+	char *path_prefix;      /* used for distinguishing absolute paths */
+	err_handler ercallback; /* callback for errors/warnings */
+	struct errctx errctx;   /* error callback context */
+	xar_subdoc_t subdocs;   /* linked list of subdocs */
+	xar_signature_t signatures; /* linked list of signatures */
+	uint64_t last_fileid;       /* unique fileid's in the archive */
+	xmlHashTablePtr ino_hash;   /* Hash for looking up hardlinked files (add)*/
+	xmlHashTablePtr link_hash;  /* Hash for looking up hardlinked files (extract)*/
+	xmlHashTablePtr csum_hash;  /* Hash for looking up checksums of files */
+	CC_MD5_CTX *toc_ctx_md5; /* CommonCrypto context for MD5 generation */
+	CC_SHA1_CTX *toc_ctx_sha1; /* CommonCrypto contedxt for SHA1 generation */
+	int docksum;
+	int skipwarn;
+	struct stat sbcache;
+};
+
+#define XAR(x) ((struct __xar_t *)(x))
+
+#endif /* _XAR_ARCHIVE_H_ */

xar/include/config.h

 /* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */
 #define HAVE_STRUCT_STATFS_F_FSTYPENAME 1
 #define HAVE_SYS_ACL_H 1
-#define HAVE_LIBUTIL_H 1
+/* #define HAVE_LIBUTIL_H */
 #define HAVE_ASPRINTF 1
 #define HAVE_LIBBZ2 1
 /* #undef HAVE_LIBLZMA */
 #define UID_CAST (uint32_t)
 #define GID_STRING PRId32
 #define GID_CAST (uint32_t)
-#define INO_STRING PRId32
+#define INO_STRING PRId64
 #define INO_HEXSTRING PRIx32
 #define INO_CAST (uint32_t)
 #define DEV_STRING PRId32

xar/include/xar.h

 int32_t xar_signature_get_x509certificate_count(xar_signature_t sig);
 int32_t xar_signature_get_x509certificate_data(xar_signature_t sig, int32_t index, const uint8_t **cert_data, uint32_t *cert_len);
 
-uint8_t xar_signature_copy_signed_data(xar_signature_t sig, uint8_t **data, uint32_t *length, uint8_t **signed_data, uint32_t *signed_length);
+uint8_t xar_signature_copy_signed_data(xar_signature_t sig, uint8_t **data, uint32_t *length, uint8_t **signed_data, uint32_t *signed_length, off_t *signed_offset);
 
 /* Helper functions - caller must free returned memory */
 char *xar_get_size(xar_t x, xar_file_t f);

xar/lib/archive.c

 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <time.h>
 #include <fcntl.h>
 #include <libgen.h>
 #include <errno.h>
 	if( off > 0 )
 		r = lseek(XAR(x)->fd, (off_t)off, SEEK_CUR);
 
-	if ( (r == -1) && (errno != ESPIPE) )
+	if ( (r == -1) && (errno != ESPIPE) ) {
 		/* Some fatal error here perhaps? */ ;
-
+    }
+    
 	return 0;
 }
 
 	if( !file )
 		file = "-";
 	XAR(ret)->filename = strdup(file);
-	OpenSSL_add_all_digests();
+
 	if( flags ) {
 		char *tmp1, *tmp2, *tmp3, *tmp4;
 		tmp1 = tmp2 = strdup(file);
 		xar_opt_set(ret, XAR_OPT_COMPRESSION, XAR_OPT_VAL_GZIP);
 		xar_opt_set(ret, XAR_OPT_FILECKSUM, XAR_OPT_VAL_SHA1);
 	} else {
-		unsigned char toccksum[EVP_MAX_MD_SIZE];
-		unsigned char cval[EVP_MAX_MD_SIZE];
+
 		unsigned int tlen;
-		const EVP_MD *md;
 
 		if( strcmp(file, "-") == 0 )
 			XAR(ret)->fd = 0;
 			break;
 		case XAR_CKSUM_SHA1:
 			XAR(ret)->docksum = 1;
-			md = EVP_get_digestbyname("sha1");
-			EVP_DigestInit(&XAR(ret)->toc_ctx, md);
+            XAR(ret)->toc_ctx_sha1 = calloc(1, sizeof (CC_SHA1_CTX));
+            CC_SHA1_Init (XAR(ret)->toc_ctx_sha1);
 			break;
 		case XAR_CKSUM_MD5:
 			XAR(ret)->docksum = 1;
-			md = EVP_get_digestbyname("md5");
-			EVP_DigestInit(&XAR(ret)->toc_ctx, md);
+            XAR(ret)->toc_ctx_md5 = calloc(1, sizeof (CC_MD5_CTX));
+            CC_MD5_Init (XAR(ret)->toc_ctx_md5);
 			break;
 		default:
 			fprintf(stderr, "Unknown hashing algorithm, skipping\n");
 			
 		if( !XAR(ret)->docksum )
 			return ret;
-		
-		EVP_DigestFinal(&XAR(ret)->toc_ctx, toccksum, &tlen);
+
+        unsigned char *toccksum = NULL;
+
+        if (XAR(ret)->toc_ctx_sha1 != NULL) {
+			toccksum = calloc (1, CC_SHA1_DIGEST_LENGTH);
+			CC_SHA1_Final(toccksum, XAR(ret)->toc_ctx_sha1);
+			tlen = CC_SHA1_DIGEST_LENGTH;
+        } else if (XAR(ret)->toc_ctx_md5 != NULL) {
+			toccksum = calloc (1, CC_MD5_DIGEST_LENGTH);
+			CC_MD5_Final(toccksum, XAR(ret)->toc_ctx_md5);
+			tlen = CC_MD5_DIGEST_LENGTH;
+		} else {
+			xar_close(ret);
+			return NULL;
+		}
         
         /* if TOC specifies a location for the checksum, make sure that
          * we read the checksum from there: this is required for an archive
 			xar_close(ret);
 			return NULL;
 		}
-        		
-		xar_read_fd(XAR(ret)->fd, cval, tlen);
+        
+        unsigned char *readcksum = calloc (1, tlen);
+		xar_read_fd(XAR(ret)->fd, readcksum, tlen);
 		XAR(ret)->heap_offset += tlen;
-		if( memcmp(cval, toccksum, tlen) != 0 ) {
+
+		if( memcmp(readcksum, toccksum, tlen) != 0 ) {
 			fprintf(stderr, "Checksums do not match!\n");
+            free (readcksum);
 			xar_close(ret);
 			return NULL;
 		}
 		long rsize, wsize;
 		z_stream zs;
 		uint64_t ungztoc, gztoc;
-		unsigned char chkstr[EVP_MAX_MD_SIZE];
+
 		int tocfd;
 		char timestr[128];
 		struct tm tmptm;
 		if( !tmpser ) tmpser = XAR_OPT_VAL_SHA1;
 
 		if( (strcmp(tmpser, XAR_OPT_VAL_NONE) != 0) ) {
-			const EVP_MD *md;
+
 			xar_prop_set(XAR_FILE(x), "checksum", NULL);
+            
 			if( strcmp(tmpser, XAR_OPT_VAL_SHA1) == 0 ) {
-				md = EVP_get_digestbyname("sha1");
-				EVP_DigestInit(&XAR(x)->toc_ctx, md);
+                if (XAR(x)->toc_ctx_sha1 == NULL) {
+                    XAR(x)->toc_ctx_sha1 = calloc (1, sizeof (CC_SHA1_CTX));
+                    CC_SHA1_Init (XAR(x)->toc_ctx_sha1);
+                }
 				XAR(x)->header.cksum_alg = htonl(XAR_CKSUM_SHA1);
 				xar_attr_set(XAR_FILE(x), "checksum", "style", XAR_OPT_VAL_SHA1);
 				xar_prop_set(XAR_FILE(x), "checksum/size", "20");
 			}
+            
 			if( strcmp(tmpser, XAR_OPT_VAL_MD5) == 0 ) {
-				md = EVP_get_digestbyname("md5");
-				EVP_DigestInit(&XAR(x)->toc_ctx, md);
+                if (XAR(x)->toc_ctx_md5 == NULL) {
+                    XAR(x)->toc_ctx_md5 = calloc (1, sizeof (CC_MD5_CTX));
+                    CC_MD5_Init (XAR(x)->toc_ctx_md5);
+                }
 				XAR(x)->header.cksum_alg = htonl(XAR_CKSUM_MD5);
 				xar_attr_set(XAR_FILE(x), "checksum", "style", XAR_OPT_VAL_MD5);
 				xar_prop_set(XAR_FILE(x), "checksum/size", "16");
 					retval = -1;
 					goto CLOSEEND;
 				}
-				if( XAR(x)->docksum )
-					EVP_DigestUpdate(&XAR(x)->toc_ctx, ((char*)wbuf)+off, r);
-				off += r;
+				if( XAR(x)->docksum ) {
+                    if (XAR(x)->toc_ctx_sha1 != NULL) {
+                        CC_SHA1_Update(XAR(x)->toc_ctx_sha1, ((char*)wbuf)+off, r);
+                    }
+                    else if (XAR(x)->toc_ctx_md5 != NULL) {
+                        CC_MD5_Update(XAR(x)->toc_ctx_md5, ((char*)wbuf)+off, r);
+                    }
+                }
+                
+                off += r;
 				gztoc += r;
 			} while( off < wbytes );
 
 		deflate(&zs, Z_FINISH);
 		r = write(tocfd, wbuf, wsize - zs.avail_out);
 		gztoc += r;
-		if( XAR(x)->docksum )
-			EVP_DigestUpdate(&XAR(x)->toc_ctx, wbuf, r);
-		
+		if( XAR(x)->docksum ) {
+            if (XAR(x)->toc_ctx_sha1 != NULL) {
+                CC_SHA1_Update(XAR(x)->toc_ctx_sha1, wbuf, r);
+            }
+            else if (XAR(x)->toc_ctx_md5 != NULL) {
+                CC_MD5_Update(XAR(x)->toc_ctx_md5, wbuf, r);
+            }
+        }
 		deflateEnd(&zs);
 
 		/* populate the header and write it out */
 			} while( off < wbytes );
 		}
 
+        unsigned char *toc_digest = NULL;
+
 		if( XAR(x)->docksum ) {
-			unsigned int l = r;
-			
-			memset(chkstr, 0, sizeof(chkstr));
-			EVP_DigestFinal(&XAR(x)->toc_ctx, chkstr, &l);
-			r = l;
-			write(XAR(x)->fd, chkstr, r);
+	
+            if (XAR(x)->toc_ctx_md5 != NULL) {
+                toc_digest = calloc(1, CC_MD5_DIGEST_LENGTH);
+                CC_MD5_Final (toc_digest, XAR(x)->toc_ctx_md5);
+                free (XAR(x)->toc_ctx_md5), XAR(x)->toc_ctx_md5 = NULL;
+                r = CC_MD5_DIGEST_LENGTH;
+                write (XAR(x)->fd, toc_digest, r);
+            } 
+            else if (XAR(x)->toc_ctx_sha1 != NULL) {
+                toc_digest = calloc(1, CC_SHA1_DIGEST_LENGTH);
+                CC_SHA1_Final (toc_digest, XAR(x)->toc_ctx_sha1);
+                free (XAR(x)->toc_ctx_sha1), XAR(x)->toc_ctx_sha1 = NULL;
+                r = CC_SHA1_DIGEST_LENGTH;
+                write (XAR(x)->fd, toc_digest, r);
+            }
 		}
 
 		/* If there are any signatures, get the signed data a sign it */
 				signed_len = XAR_SIGNATURE(sig)->len;
 				
 				/* If callback returns something other then 0, bail */
-				if( 0 != sig->signer_callback( sig, sig->callback_context, chkstr, data_len, &signed_data, &signed_len ) ){
+                if( 0 != sig->signer_callback( sig, sig->callback_context, toc_digest, data_len, &signed_data, &signed_len ) ){
 					fprintf(stderr, "Error signing data.\n");
 					retval = -1;
 					close(fd);
 			XAR(x)->signatures = NULL;
 		}
 
+        if (toc_digest != NULL) {
+            free (toc_digest);
+            toc_digest = NULL;
+        }
+        
 		/* copy the heap from the temporary heap into the archive */
 		if( lseek(XAR(x)->heap_fd, (off_t)0, SEEK_SET) < 0 ) {
 			fprintf(stderr, "Error lseeking to offset 0: %s\n", strerror(errno));
  * Returns: 0 for sucess, -1 for failure
  */
 int32_t xar_opt_set(xar_t x, const char *option, const char *value) {
-	xar_attr_t currentAttr, a;
+	xar_attr_t a;
 
 	if( (strcmp(option, XAR_OPT_TOCCKSUM) == 0) ) {
 		if( strcmp(value, XAR_OPT_VAL_NONE) == 0 ) {
 		if ( ret == -1 )
 			return ret;
 
-		if ( XAR(x)->docksum )
-			EVP_DigestUpdate(&XAR(x)->toc_ctx, XAR(x)->readbuf, ret);
+		if ( XAR(x)->docksum ) {
+            if (XAR(x)->toc_ctx_sha1 != NULL) {
+                CC_SHA1_Update (XAR(x)->toc_ctx_sha1, XAR(x)->readbuf, ret);
+            } else if (XAR(x)->toc_ctx_md5 != NULL) {
+				CC_MD5_Update (XAR(x)->toc_ctx_md5, XAR(x)->readbuf, ret);
+			}
+		}
 
 		XAR(x)->toc_count += ret;
 		off += ret;

xar/lib/archive.h

 #define _XAR_ARCHIVE_H_
 #include <zlib.h>
 #include <libxml/hash.h>
-#include <openssl/evp.h>
+#include <CommonCrypto/CommonDigest.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include "xar.h"
 	xar_header_t header;    /* header of the xar archive */
 	void *readbuf;          /* buffer for reading/writing compressed toc */
 	size_t readbuf_len;     /* length of readbuf */
-	size_t offset;          /* offset into readbuf for keeping track
-	                         * between callbacks. */
+	size_t offset;          /* offset into readbuf for keeping track between callbacks. */
 	size_t toc_count;       /* current bytes read of the toc */
 	z_stream zs;            /* gz state for compressing/decompressing toc */
 	char *path_prefix;      /* used for distinguishing absolute paths */
 	xmlHashTablePtr ino_hash;   /* Hash for looking up hardlinked files (add)*/
 	xmlHashTablePtr link_hash;  /* Hash for looking up hardlinked files (extract)*/
 	xmlHashTablePtr csum_hash;  /* Hash for looking up checksums of files */
-	EVP_MD_CTX toc_ctx;
+	CC_MD5_CTX *toc_ctx_md5; /* CommonCrypto context for MD5 generation */
+	CC_SHA1_CTX *toc_ctx_sha1; /* CommonCrypto contedxt for SHA1 generation */
 	int docksum;
 	int skipwarn;
 	struct stat sbcache;

xar/lib/darwinattr.c

 #if defined(__APPLE__)
 #ifdef HAVE_GETATTRLIST
 #include <sys/attr.h>
+#if TARGET_OS_MAC && !TARGET_OS_IPHONE
 #include <sys/vnode.h>
+#endif
 struct fi {
     uint32_t     length;
     fsobj_type_t objtype;
 #include <string.h>
 #include <sys/types.h>
 #include <zlib.h>
-#include <openssl/evp.h>
+#include <CommonCrypto/CommonDigest.h>
 
 #include "xar.h"
 #include "hash.h"
 #include "asprintf.h"
 #endif
 
+static inline int IsDigestNone (const char *digestType) {
+    if (digestType == NULL) return 0;
+    else return (strncasecmp(digestType, XAR_OPT_VAL_NONE, strlen(XAR_OPT_VAL_NONE)) == 0);
+}
+
+static inline int IsDigestMD5 (const char *digestType) {
+    if (digestType == NULL) return 0;
+    else return (strncasecmp(digestType, XAR_OPT_VAL_MD5, strlen(XAR_OPT_VAL_MD5)) == 0);
+}
+
+static inline int IsDigestSHA1 (const char *digestType) {
+    if (digestType == NULL) return 0;
+    else return (strncasecmp(digestType, XAR_OPT_VAL_SHA1, strlen(XAR_OPT_VAL_SHA1)) == 0);
+}
 
 struct _hash_context{
-	EVP_MD_CTX unarchived_cts;
-	EVP_MD_CTX archived_cts;
+    const char *digest_type;
+	CC_MD5_CTX unarchived_md5_cts;
+	CC_SHA1_CTX unarchived_sha1_cts;
+	CC_MD5_CTX archived_md5_cts;
+	CC_SHA1_CTX archived_sha1_cts;
 	uint8_t	unarchived;
 	uint8_t archived;
 	uint64_t count;
 }
 
 int32_t xar_hash_unarchived_out(xar_t x, xar_file_t f, xar_prop_t p, void *in, size_t inlen, void **context) {
-	const char *opt;
-	const EVP_MD *md;
+	const char *digestType;
 	xar_prop_t tmpp;
 
-	opt = NULL;
+	digestType = NULL;
 	tmpp = xar_prop_pget(p, "extracted-checksum");
 	if( tmpp )
-		opt = xar_attr_pget(f, tmpp, "style");
+		digestType = xar_attr_pget(f, tmpp, "style");
 	
-	if( !opt ) 	
-		opt = xar_opt_get(x, XAR_OPT_FILECKSUM);
+	if( !digestType ) 	
+		digestType = xar_opt_get(x, XAR_OPT_FILECKSUM);
 
-	if( !opt || (0 == strcmp(opt, XAR_OPT_VAL_NONE) ) )
+	if( !digestType || (0 == strcmp(digestType, XAR_OPT_VAL_NONE) ) )
 		return 0;
 	
-	if(!CONTEXT(context)){
+	if (!CONTEXT(context)){
 		*context = calloc(1,sizeof(struct _hash_context));
-		OpenSSL_add_all_digests();
+		CONTEXT(context)->digest_type = digestType;
 	}
-	
+
 	if( !CONTEXT(context)->unarchived ){
-		md = EVP_get_digestbyname(opt);
-		if( md == NULL ) return -1;
-		EVP_DigestInit(&(CONTEXT(context)->unarchived_cts), md);
-		CONTEXT(context)->unarchived = 1;		
+		if (IsDigestMD5 (digestType)) {
+			CC_MD5_Init (&CONTEXT(context)->unarchived_md5_cts);
+			CONTEXT(context)->unarchived = 1;
+		} 
+		else if (IsDigestSHA1 (digestType)) {
+			CC_SHA1_Init (&CONTEXT(context)->unarchived_sha1_cts);
+			CONTEXT(context)->unarchived = 1;
+		}
 	}
 		
 	if( inlen == 0 )
 		return 0;
 	
 	CONTEXT(context)->count += inlen;
-	EVP_DigestUpdate(&(CONTEXT(context)->unarchived_cts), in, inlen);
+    if (IsDigestSHA1 (digestType)) {
+        CC_SHA1_Update(&CONTEXT(context)->unarchived_sha1_cts, in, inlen);	
+	} else if (IsDigestMD5 (digestType)) {
+		CC_MD5_Update(&CONTEXT(context)->unarchived_md5_cts, in, inlen);
+	}
 	return 0;
 }
 
 }
 
 int32_t xar_hash_archived_in(xar_t x, xar_file_t f, xar_prop_t p, void *in, size_t inlen, void **context) {
-	const char *opt;
-	const EVP_MD *md;
+	const char *digestType;
 	xar_prop_t tmpp;
 	
-	opt = NULL;
+	digestType = NULL;
 	tmpp = xar_prop_pget(p, "archived-checksum");
 	if( tmpp )
-		opt = xar_attr_pget(f, tmpp, "style");
+		digestType = xar_attr_pget(f, tmpp, "style");
 	
-	if( !opt ) 	
-		opt = xar_opt_get(x, XAR_OPT_FILECKSUM);
+	if( !digestType ) 	
+		digestType = xar_opt_get(x, XAR_OPT_FILECKSUM);
 	
-	if( !opt || (0 == strcmp(opt, XAR_OPT_VAL_NONE) ) )
+	if( !digestType || (0 == strcmp(digestType, XAR_OPT_VAL_NONE) ) )
 		return 0;
 		
 	if(!CONTEXT(context)){
 		*context = calloc(1,sizeof(struct _hash_context));
-		OpenSSL_add_all_digests();
+		CONTEXT(context)->digest_type = digestType;
+
 	}
 	
 	if ( !CONTEXT(context)->archived ){
-		md = EVP_get_digestbyname(opt);
-		if( md == NULL ) return -1;
-		EVP_DigestInit(&(CONTEXT(context)->archived_cts), md);		
-		CONTEXT(context)->archived = 1;		
+        if (IsDigestSHA1 (digestType)) {
+			CC_SHA1_Init (&CONTEXT(context)->archived_sha1_cts);
+			CONTEXT(context)->archived = 1;
+		} else if (IsDigestMD5 (digestType)) {
+			CC_MD5_Init (&CONTEXT(context)->archived_md5_cts);
+			CONTEXT(context)->archived = 1;	
+		} 	
 	}
 
 	if( inlen == 0 )
 		return 0;
 
 	CONTEXT(context)->count += inlen;
-	EVP_DigestUpdate(&(CONTEXT(context)->archived_cts), in, inlen);
+    if (IsDigestSHA1 (digestType)) {
+		CC_SHA1_Update(&CONTEXT(context)->archived_sha1_cts, in, inlen);
+	} else if (IsDigestMD5 (digestType)) {
+		CC_MD5_Update(&CONTEXT(context)->archived_md5_cts, in, inlen);
+	} 
 	return 0;
 }
 
 int32_t xar_hash_done(xar_t x, xar_file_t f, xar_prop_t p, void **context) {
-	unsigned char hashstr[EVP_MAX_MD_SIZE];
-	char *str;
-	unsigned int len;
-	xar_prop_t tmpp;
+
 
 	if(!CONTEXT(context))
 		return 0;
 	if( CONTEXT(context)->count == 0 )
 		goto DONE;
 
+	char *str = NULL;
+	xar_prop_t tmpp;
+    unsigned char *hashstr = NULL;
+    
 	if( CONTEXT(context)->unarchived ){
-		EVP_MD_CTX		*ctx = &CONTEXT(context)->unarchived_cts;
-		const EVP_MD			*md = EVP_MD_CTX_md(ctx);
-		const char *type = EVP_MD_name(md);
 
-		memset(hashstr, 0, sizeof(hashstr));
-		EVP_DigestFinal(&(CONTEXT(context)->unarchived_cts), hashstr, &len);
-		str = xar_format_hash(hashstr,len);
-		if( f ) {
-			tmpp = xar_prop_pset(f, p, "extracted-checksum", str);
-			if( tmpp )
-				xar_attr_pset(f, tmpp, "style", type);
+        if (IsDigestSHA1 (CONTEXT(context)->digest_type)) {
+			hashstr = calloc (1, CC_SHA1_DIGEST_LENGTH);
+			CC_SHA1_Final (hashstr, &CONTEXT(context)->unarchived_sha1_cts);
+            str = xar_format_hash (hashstr, CC_SHA1_DIGEST_LENGTH);
 		}
-		free(str);		
+        else if (IsDigestMD5 (CONTEXT(context)->digest_type)) {
+            hashstr = calloc (1, CC_MD5_DIGEST_LENGTH);
+			CC_MD5_Final (hashstr, &CONTEXT(context)->unarchived_md5_cts);
+            str = xar_format_hash (hashstr, CC_MD5_DIGEST_LENGTH);
+		}
+
+        if( f ) {
+            tmpp = xar_prop_pset(f, p, "extracted-checksum", str);
+            if( tmpp )
+                xar_attr_pset(f, tmpp, "style", CONTEXT(context)->digest_type);
+        }
+        
+        if (hashstr != NULL) {
+            free (hashstr);
+            hashstr = NULL; 
+        }
+        
+        if (str != NULL) {
+            free(str);
+            str = NULL;
+        }
 	}
 
 	if( CONTEXT(context)->archived ){
-		EVP_MD_CTX				*ctx = &CONTEXT(context)->archived_cts;
-		const EVP_MD			*md = EVP_MD_CTX_md(ctx);
-		const char		*type = EVP_MD_name(md);
-		
-		memset(hashstr, 0, sizeof(hashstr));
-		EVP_DigestFinal(&(CONTEXT(context)->archived_cts), hashstr, &len);
-		str = xar_format_hash(hashstr,len);
-		if( f ) {
-			tmpp = xar_prop_pset(f, p, "archived-checksum", str);
-			if( tmpp )
-				xar_attr_pset(f, tmpp, "style", type);
+
+        if (IsDigestSHA1 (CONTEXT(context)->digest_type)) {
+            hashstr = calloc (1, CC_SHA1_DIGEST_LENGTH);
+			CC_SHA1_Final (hashstr, &CONTEXT(context)->archived_sha1_cts);
+            str = xar_format_hash (hashstr, CC_SHA1_DIGEST_LENGTH);
 		}
-		free(str);
-	}
+        else if (IsDigestMD5 (CONTEXT(context)->digest_type)) {
+			hashstr = calloc (1, CC_MD5_DIGEST_LENGTH);
+			CC_MD5_Final (hashstr, &CONTEXT(context)->archived_md5_cts);
+            str = xar_format_hash (hashstr, CC_MD5_DIGEST_LENGTH);
+        }
+        
+        if( f ) {
+            tmpp = xar_prop_pset(f, p, "archived-checksum", str);
+            if( tmpp )
+                xar_attr_pset(f, tmpp, "style", CONTEXT(context)->digest_type);
+        }
+
+        if (hashstr != NULL) {
+            free (hashstr);
+            hashstr = NULL; 
+        }
+        
+        if (str != NULL) {
+            free(str);
+            str = NULL;
+        }
+    }
 	
 DONE:
 	if(*context){
 }
 
 int32_t xar_hash_out_done(xar_t x, xar_file_t f, xar_prop_t p, void **context) {
-	const char *uncomp = NULL, *uncompstyle = NULL;
-	unsigned char hashstr[EVP_MAX_MD_SIZE];
-	unsigned int len;
-	char *tmpstr;
-	const EVP_MD *md;
-	int32_t err = 0;
-	xar_prop_t tmpp;
 
 	if(!CONTEXT(context))
 		return 0;
 
+    int32_t err = 0;
+	xar_prop_t tmpp;
+    void *hashBytes = NULL;
+    char *hashStr = NULL;
+    
 	if( CONTEXT(context)->archived ){	
+        
+        const char *digestType = NULL;
+		const char *archivedChecksum = NULL;
+        
 		tmpp = xar_prop_pget(p, "archived-checksum");
 		if( tmpp ) {
-			uncompstyle = xar_attr_pget(f, tmpp, "style");
-			uncomp = xar_prop_getvalue(tmpp);
+			digestType = xar_attr_pget(f, tmpp, "style");
+			archivedChecksum = xar_prop_getvalue(tmpp);
 		}
-		
-		md = EVP_get_digestbyname(uncompstyle);
+        
+		if( archivedChecksum && digestType && CONTEXT(context)->archived ) {
+                        
+            if (IsDigestSHA1 (digestType)) {
+				hashBytes = calloc (1, CC_SHA1_DIGEST_LENGTH);
+				CC_SHA1_Final (hashBytes, &CONTEXT(context)->archived_sha1_cts);
+				hashStr = xar_format_hash (hashBytes, CC_SHA1_DIGEST_LENGTH);
+				if (strncmp (archivedChecksum, hashStr, CC_SHA1_DIGEST_LENGTH) != 0) {
+					xar_err_new(x);
+					xar_err_set_file(x, f);
+					char *errmsg = NULL;
+					asprintf(&errmsg, "archived-checksum %s's do not match", digestType);
+					xar_err_set_string(x, errmsg);
+					xar_err_callback(x, XAR_SEVERITY_FATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+					err = -1; 
+				}
+			} 
+            else if (IsDigestMD5 (digestType)) {
+				hashBytes = calloc (1, CC_MD5_DIGEST_LENGTH);
+				CC_MD5_Final (hashBytes, &CONTEXT(context)->archived_md5_cts);
+				hashStr = xar_format_hash (hashBytes, CC_MD5_DIGEST_LENGTH);
+				if (strncmp (archivedChecksum, hashStr, CC_MD5_DIGEST_LENGTH) != 0) {
+					xar_err_new(x);
+					xar_err_set_file(x, f);
+					char *errmsg = NULL;
+					asprintf(&errmsg, "archived-checksum %s's do not match", digestType);
+					xar_err_set_string(x, errmsg);
+					xar_err_callback(x, XAR_SEVERITY_FATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+					err = -1; 
+				}
+			} 
 
-		if( uncomp && uncompstyle && md && CONTEXT(context)->archived ) {
-			char *str;
-			memset(hashstr, 0, sizeof(hashstr));
-			EVP_DigestFinal(&(CONTEXT(context)->archived_cts), hashstr, &len);
-			str = xar_format_hash(hashstr,len);
-			if(strcmp(uncomp, str) != 0) {
-				xar_err_new(x);
-				xar_err_set_file(x, f);
-				asprintf(&tmpstr, "archived-checksum %s's do not match",uncompstyle);
-				xar_err_set_string(x, tmpstr);
-				xar_err_callback(x, XAR_SEVERITY_FATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-				err = -1; 
-			}
-			free(str);
+            // Cleanup
+			if (hashBytes != NULL) {
+                free (hashBytes);
+                hashBytes = NULL; 
+            }
+			if (hashStr != NULL) {
+                free (hashStr);
+                hashStr = NULL;
+            }
 		}
 	}
 	
-	if( CONTEXT(context)->unarchived )
-	    EVP_DigestFinal(&(CONTEXT(context)->unarchived_cts), hashstr, &len);
+	if( CONTEXT(context)->unarchived ) {
+
+        if (IsDigestSHA1 (CONTEXT(context)->digest_type)) {
+			hashBytes = calloc (1, CC_SHA1_DIGEST_LENGTH);
+			CC_SHA1_Final (hashBytes, &CONTEXT(context)->unarchived_sha1_cts);
+		}
+		else if (IsDigestMD5 (CONTEXT(context)->digest_type)) {
+			hashBytes = calloc (1, CC_MD5_DIGEST_LENGTH);
+			CC_MD5_Final (hashBytes, &CONTEXT(context)->unarchived_md5_cts);
+		}
+		
+		if (hashBytes != NULL) {
+            free (hashBytes);
+            hashBytes = NULL;
+        }
+    }
 
 	if(*context){
 		free(*context);

xar/lib/signature.c

 }
 
 /* This method retrieves the signed data for this segment as well as the data the signed data is signing */
+
 uint8_t xar_signature_copy_signed_data(xar_signature_t sig, uint8_t **data, uint32_t *length, uint8_t **signed_data, uint32_t *signed_length, off_t *signed_offset)
 {
 	uint32_t offset = 0;
 #include <arpa/inet.h>
 #include <string.h>
 #include <unistd.h>
+#include <time.h>
 #include <errno.h>
 #include "config.h"
 #ifndef HAVE_ASPRINTF
 	if (strlen(path) == 0 || path[0] == '/')
 		return 0;
 	
-	while (component = xar_path_nextcomponent(&path_walker)) {
+	while ((component = xar_path_nextcomponent(&path_walker))) {
 		
 		if (strlen(component) == 0 || strcmp(component, ".") == 0) { // Since // is legal, and '.' is legal it's possible to have empty path elements. Ignore them
 			free(component);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.