Bill Garrison avatar Bill Garrison committed 521ff71 Merge

Merge xar-105 into default.

Comments (0)

Files changed (12)

Binary file added.

xar.xcodeproj/project.pbxproj

 			name = OpenSource;
 			productName = OpenSource;
 		};
-		B41FC12F09F6BF5900006FAE /* All */ = {
+		B41FC12F09F6BF5900006FAE /* All libraries */ = {
 			isa = PBXAggregateTarget;
-			buildConfigurationList = B41FC13709F6BF7900006FAE /* Build configuration list for PBXAggregateTarget "All" */;
+			buildConfigurationList = B41FC13709F6BF7900006FAE /* Build configuration list for PBXAggregateTarget "All libraries" */;
 			buildPhases = (
 			);
 			dependencies = (
-				EEEFF4070EFB70EF00DBC955 /* PBXTargetDependency */,
 				B41FC13109F6BF6300006FAE /* PBXTargetDependency */,
 				B41FC13509F6BF6300006FAE /* PBXTargetDependency */,
-				B41FC13309F6BF6300006FAE /* PBXTargetDependency */,
 				B401A30309F6D71800B5C762 /* PBXTargetDependency */,
 			);
+			name = "All libraries";
+			productName = All;
+		};
+		E9D659A31486FD650089C4DA /* All tools */ = {
+			isa = PBXAggregateTarget;
+			buildConfigurationList = E9D659A41486FD650089C4DA /* Build configuration list for PBXAggregateTarget "All tools" */;
+			buildPhases = (
+			);
+			dependencies = (
+				E91435421497E100001AA5EF /* PBXTargetDependency */,
+				E9D659AA1486FD6D0089C4DA /* PBXTargetDependency */,
+				E9D659A81486FD6A0089C4DA /* PBXTargetDependency */,
+			);
+			name = "All tools";
+			productName = "All tools";
+		};
+		E9D659AB1486FFD10089C4DA /* All */ = {
+			isa = PBXAggregateTarget;
+			buildConfigurationList = E9D659AC1486FFD10089C4DA /* Build configuration list for PBXAggregateTarget "All" */;
+			buildPhases = (
+			);
+			dependencies = (
+				E9D659B01486FFED0089C4DA /* PBXTargetDependency */,
+				E9D659B21486FFED0089C4DA /* PBXTargetDependency */,
+				E9D659B41486FFED0089C4DA /* PBXTargetDependency */,
+				E9D659B61486FFED0089C4DA /* PBXTargetDependency */,
+				E9D659B81486FFED0089C4DA /* PBXTargetDependency */,
+			);
 			name = All;
 			productName = All;
 		};
 		B41FC0C109F6BC2C00006FAE /* zxar.c in Sources */ = {isa = PBXBuildFile; fileRef = B41FC09909F6BC2C00006FAE /* zxar.c */; };
 		B41FC0C809F6BC7A00006FAE /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC0C409F6BC7A00006FAE /* libz.dylib */; };
 		B41FC0C909F6BC7A00006FAE /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC0C509F6BC7A00006FAE /* libbz2.dylib */; };
-		B41FC0CA09F6BC7A00006FAE /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC0C609F6BC7A00006FAE /* libcrypto.dylib */; };
 		B41FC0CB09F6BC7A00006FAE /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC0C709F6BC7A00006FAE /* libxml2.dylib */; };
 		B41FC0E909F6BDAF00006FAE /* libxar.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC05F09F6B7C200006FAE /* libxar.1.dylib */; };
 		B41FC0EC09F6BDD900006FAE /* xar.c in Sources */ = {isa = PBXBuildFile; fileRef = B41FC0EB09F6BDD900006FAE /* xar.c */; };
 		B41FC10A09F6BE9100006FAE /* zxar.c in Sources */ = {isa = PBXBuildFile; fileRef = B41FC09909F6BC2C00006FAE /* zxar.c */; };
 		B41FC10B09F6BE9B00006FAE /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC0C409F6BC7A00006FAE /* libz.dylib */; };
 		B41FC10C09F6BE9B00006FAE /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC0C509F6BC7A00006FAE /* libbz2.dylib */; };
-		B41FC10D09F6BE9B00006FAE /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC0C609F6BC7A00006FAE /* libcrypto.dylib */; };
 		B41FC10E09F6BE9B00006FAE /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC0C709F6BC7A00006FAE /* libxml2.dylib */; };
 		B41FC12A09F6BF3700006FAE /* xar.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = B41FC12509F6BF3300006FAE /* xar.plist */; };
 		B41FC12B09F6BF3C00006FAE /* xar.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = B41FC12609F6BF3300006FAE /* xar.txt */; };
 		B476FACD0A49E68600BCD61F /* signature.c in Sources */ = {isa = PBXBuildFile; fileRef = B476FACC0A49E68600BCD61F /* signature.c */; };
 		B476FACF0A49E68600BCD61F /* signature.c in Sources */ = {isa = PBXBuildFile; fileRef = B476FACC0A49E68600BCD61F /* signature.c */; };
 		B4772CA30A003F7300E4205C /* xar.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B4772CA20A003F6E00E4205C /* xar.h */; };
+		E9C0E6741497DDAB00BF8F0F /* ea.h in Headers */ = {isa = PBXBuildFile; fileRef = E9C0E6731497DDAB00BF8F0F /* ea.h */; };
 		EEEFF3E60EFB700A00DBC955 /* xar-sig.c in Sources */ = {isa = PBXBuildFile; fileRef = EEEFF3DC0EFB6FC500DBC955 /* xar-sig.c */; };
 		EEEFF40E0EFB715100DBC955 /* libxar.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B41FC05F09F6B7C200006FAE /* libxar.1.dylib */; };
 /* End PBXBuildFile section */
 			remoteGlobalIDString = B41FC04F09F6B76200006FAE;
 			remoteInfo = configure;
 		};
-		B41FC0E409F6BD6D00006FAE /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = B41FC05E09F6B7C200006FAE;
-			remoteInfo = xarLib;
-		};
 		B41FC11E09F6BEDE00006FAE /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
 			remoteGlobalIDString = B41FC05E09F6B7C200006FAE;
 			remoteInfo = xarLib;
 		};
-		B41FC13209F6BF6300006FAE /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = B41FC0E109F6BD6800006FAE;
-			remoteInfo = xarTool;
-		};
 		B41FC13409F6BF6300006FAE /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
 			remoteGlobalIDString = B41FC0F309F6BE2F00006FAE;
 			remoteInfo = xarStatic;
 		};
-		EEEFF4060EFB70EF00DBC955 /* PBXContainerItemProxy */ = {
+		E914353F1497E0F6001AA5EF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = B41FC04F09F6B76200006FAE;
+			remoteInfo = configure;
+		};
+		E91435411497E100001AA5EF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = B41FC04F09F6B76200006FAE;
+			remoteInfo = configure;
+		};
+		E9C0E6761497DE6000BF8F0F /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = B41FC04F09F6B76200006FAE;
+			remoteInfo = configure;
+		};
+		E9D659A71486FD6A0089C4DA /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = B41FC0E109F6BD6800006FAE;
+			remoteInfo = xarTool;
+		};
+		E9D659A91486FD6D0089C4DA /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
 			proxyType = 1;
 			remoteGlobalIDString = EEEFF3DF0EFB6FD500DBC955;
 			remoteInfo = xarsig;
 		};
-		EEEFF40A0EFB710500DBC955 /* PBXContainerItemProxy */ = {
+		E9D659AF1486FFED0089C4DA /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
 			proxyType = 1;
 			remoteGlobalIDString = B41FC05E09F6B7C200006FAE;
 			remoteInfo = xarLib;
 		};
+		E9D659B11486FFED0089C4DA /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = B41FC0E109F6BD6800006FAE;
+			remoteInfo = xarTool;
+		};
+		E9D659B31486FFED0089C4DA /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = B41FC0F309F6BE2F00006FAE;
+			remoteInfo = xarStatic;
+		};
+		E9D659B51486FFED0089C4DA /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = B41FC12109F6BEF900006FAE;
+			remoteInfo = OpenSource;
+		};
+		E9D659B71486FFED0089C4DA /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = B41FC04109F6B74500006FAE /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = EEEFF3DF0EFB6FD500DBC955;
+			remoteInfo = xarsig;
+		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXCopyFilesBuildPhase section */
 		B41FC09A09F6BC2C00006FAE /* zxar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = zxar.h; path = xar/lib/zxar.h; sourceTree = "<group>"; };
 		B41FC0C409F6BC7A00006FAE /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
 		B41FC0C509F6BC7A00006FAE /* libbz2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libbz2.dylib; path = /usr/lib/libbz2.dylib; sourceTree = "<absolute>"; };
-		B41FC0C609F6BC7A00006FAE /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = /usr/lib/libcrypto.dylib; sourceTree = "<absolute>"; };
 		B41FC0C709F6BC7A00006FAE /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = /usr/lib/libxml2.dylib; sourceTree = "<absolute>"; };
 		B41FC0E209F6BD6800006FAE /* xar */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = xar; sourceTree = BUILT_PRODUCTS_DIR; };
 		B41FC0EA09F6BDD900006FAE /* xar.1 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.man; name = xar.1; path = xar/src/xar.1; sourceTree = "<group>"; };
 		B4657F1E0A49E6150074E45D /* signature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = signature.h; path = xar/lib/signature.h; sourceTree = "<group>"; };
 		B476FACC0A49E68600BCD61F /* signature.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = signature.c; path = xar/lib/signature.c; sourceTree = "<group>"; };
 		B4772CA20A003F6E00E4205C /* xar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = xar.h; path = include/xar.h; sourceTree = BUILT_PRODUCTS_DIR; };
+		E9C0E6731497DDAB00BF8F0F /* ea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ea.h; path = xar/lib/ea.h; sourceTree = "<group>"; };
 		EEEFF3DC0EFB6FC500DBC955 /* xar-sig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "xar-sig.c"; path = "xarsig/xar-sig.c"; sourceTree = "<group>"; };
 		EEEFF3E00EFB6FD500DBC955 /* xarsig */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = xarsig; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 			files = (
 				B41FC0C809F6BC7A00006FAE /* libz.dylib in Frameworks */,
 				B41FC0C909F6BC7A00006FAE /* libbz2.dylib in Frameworks */,
-				B41FC0CA09F6BC7A00006FAE /* libcrypto.dylib in Frameworks */,
 				B41FC0CB09F6BC7A00006FAE /* libxml2.dylib in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			files = (
 				B41FC10B09F6BE9B00006FAE /* libz.dylib in Frameworks */,
 				B41FC10C09F6BE9B00006FAE /* libbz2.dylib in Frameworks */,
-				B41FC10D09F6BE9B00006FAE /* libcrypto.dylib in Frameworks */,
 				B41FC10E09F6BE9B00006FAE /* libxml2.dylib in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		B41FC07109F6BBBD00006FAE /* lib */ = {
 			isa = PBXGroup;
 			children = (
+				E9C0E6731497DDAB00BF8F0F /* ea.h */,
 				98665C700EA83E44008193F1 /* lzmaxar.c */,
 				98665C6E0EA83E36008193F1 /* ea.c */,
 				B41FC16309F6C56600006FAE /* config.h.in */,
 			children = (
 				B41FC0C409F6BC7A00006FAE /* libz.dylib */,
 				B41FC0C509F6BC7A00006FAE /* libbz2.dylib */,
-				B41FC0C609F6BC7A00006FAE /* libcrypto.dylib */,
 				B41FC0C709F6BC7A00006FAE /* libxml2.dylib */,
 			);
 			name = libraries;
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				E9C0E6741497DDAB00BF8F0F /* ea.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 			buildRules = (
 			);
 			dependencies = (
-				B41FC0E509F6BD6D00006FAE /* PBXTargetDependency */,
+				E9C0E6771497DE6000BF8F0F /* PBXTargetDependency */,
 			);
 			name = xarTool;
 			productName = xarTool;
 			buildRules = (
 			);
 			dependencies = (
-				EEEFF40B0EFB710500DBC955 /* PBXTargetDependency */,
+				E91435401497E0F6001AA5EF /* PBXTargetDependency */,
 			);
 			name = xarsig;
 			productName = xarsig;
 			projectDirPath = "";
 			projectRoot = "";
 			targets = (
-				B41FC12F09F6BF5900006FAE /* All */,
+				E9D659AB1486FFD10089C4DA /* All */,
+				E9D659A31486FD650089C4DA /* All tools */,
+				B41FC12F09F6BF5900006FAE /* All libraries */,
 				B41FC04F09F6B76200006FAE /* configure */,
 				B41FC05E09F6B7C200006FAE /* xarLib */,
 				B41FC0E109F6BD6800006FAE /* xarTool */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# shell script goes here\n\nif [ ! -e \"$BUILT_PRODUCTS_DIR\" ]; then\n\tmkdir \"$BUILT_PRODUCTS_DIR\"\nfi\n\ncd \"$BUILT_PRODUCTS_DIR\"\n\n$SRCROOT/xar/configure\n\n\nexit 0";
+			shellScript = "# shell script goes here\n\nif [ ! -e \"$BUILT_PRODUCTS_DIR\" ]; then\n\tmkdir -p \"$BUILT_PRODUCTS_DIR\"\nfi\n\ncd \"$BUILT_PRODUCTS_DIR\"\n\n$SRCROOT/xar/configure\n\n\nexit 0";
 		};
 /* End PBXShellScriptBuildPhase section */
 
 			target = B41FC04F09F6B76200006FAE /* configure */;
 			targetProxy = B41FC0D609F6BD0300006FAE /* PBXContainerItemProxy */;
 		};
-		B41FC0E509F6BD6D00006FAE /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = B41FC05E09F6B7C200006FAE /* xarLib */;
-			targetProxy = B41FC0E409F6BD6D00006FAE /* PBXContainerItemProxy */;
-		};
 		B41FC11F09F6BEDE00006FAE /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = B41FC04F09F6B76200006FAE /* configure */;
 			target = B41FC05E09F6B7C200006FAE /* xarLib */;
 			targetProxy = B41FC13009F6BF6300006FAE /* PBXContainerItemProxy */;
 		};
-		B41FC13309F6BF6300006FAE /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = B41FC0E109F6BD6800006FAE /* xarTool */;
-			targetProxy = B41FC13209F6BF6300006FAE /* PBXContainerItemProxy */;
-		};
 		B41FC13509F6BF6300006FAE /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = B41FC0F309F6BE2F00006FAE /* xarStatic */;
 			targetProxy = B41FC13409F6BF6300006FAE /* PBXContainerItemProxy */;
 		};
-		EEEFF4070EFB70EF00DBC955 /* PBXTargetDependency */ = {
+		E91435401497E0F6001AA5EF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = B41FC04F09F6B76200006FAE /* configure */;
+			targetProxy = E914353F1497E0F6001AA5EF /* PBXContainerItemProxy */;
+		};
+		E91435421497E100001AA5EF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = B41FC04F09F6B76200006FAE /* configure */;
+			targetProxy = E91435411497E100001AA5EF /* PBXContainerItemProxy */;
+		};
+		E9C0E6771497DE6000BF8F0F /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = B41FC04F09F6B76200006FAE /* configure */;
+			targetProxy = E9C0E6761497DE6000BF8F0F /* PBXContainerItemProxy */;
+		};
+		E9D659A81486FD6A0089C4DA /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = B41FC0E109F6BD6800006FAE /* xarTool */;
+			targetProxy = E9D659A71486FD6A0089C4DA /* PBXContainerItemProxy */;
+		};
+		E9D659AA1486FD6D0089C4DA /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = EEEFF3DF0EFB6FD500DBC955 /* xarsig */;
-			targetProxy = EEEFF4060EFB70EF00DBC955 /* PBXContainerItemProxy */;
+			targetProxy = E9D659A91486FD6D0089C4DA /* PBXContainerItemProxy */;
 		};
-		EEEFF40B0EFB710500DBC955 /* PBXTargetDependency */ = {
+		E9D659B01486FFED0089C4DA /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = B41FC05E09F6B7C200006FAE /* xarLib */;
-			targetProxy = EEEFF40A0EFB710500DBC955 /* PBXContainerItemProxy */;
+			targetProxy = E9D659AF1486FFED0089C4DA /* PBXContainerItemProxy */;
+		};
+		E9D659B21486FFED0089C4DA /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = B41FC0E109F6BD6800006FAE /* xarTool */;
+			targetProxy = E9D659B11486FFED0089C4DA /* PBXContainerItemProxy */;
+		};
+		E9D659B41486FFED0089C4DA /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = B41FC0F309F6BE2F00006FAE /* xarStatic */;
+			targetProxy = E9D659B31486FFED0089C4DA /* PBXContainerItemProxy */;
+		};
+		E9D659B61486FFED0089C4DA /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = B41FC12109F6BEF900006FAE /* OpenSource */;
+			targetProxy = E9D659B51486FFED0089C4DA /* PBXContainerItemProxy */;
+		};
+		E9D659B81486FFED0089C4DA /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = EEEFF3DF0EFB6FD500DBC955 /* xarsig */;
+			targetProxy = E9D659B71486FFED0089C4DA /* PBXContainerItemProxy */;
 		};
 /* End PBXTargetDependency section */
 
 				ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
 				ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 46;
+				CURRENT_PROJECT_VERSION = 105;
 				STRIP_STYLE = debugging;
 				VALID_ARCHS = "i386 x86_64";
 				VERSIONING_SYSTEM = "apple-generic";
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 46;
+				CURRENT_PROJECT_VERSION = 105;
 				EXECUTABLE_PREFIX = lib;
 				GCC_ENABLE_FIX_AND_CONTINUE = NO;
 				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 46;
+				CURRENT_PROJECT_VERSION = 105;
 				GCC_ENABLE_FIX_AND_CONTINUE = NO;
 				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
 				GCC_MODEL_TUNING = G5;
 			};
 			name = Release;
 		};
+		E9D659A51486FD650089C4DA /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = x86_64;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Development;
+		};
+		E9D659A61486FD650089C4DA /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = x86_64;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+		E9D659AD1486FFD10089C4DA /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Development;
+		};
+		E9D659AE1486FFD10089C4DA /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
 		EEEFF3E20EFB6FD600DBC955 /* Development */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		B41FC13709F6BF7900006FAE /* Build configuration list for PBXAggregateTarget "All" */ = {
+		B41FC13709F6BF7900006FAE /* Build configuration list for PBXAggregateTarget "All libraries" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				B41FC13809F6BF7900006FAE /* Development */,
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		E9D659A41486FD650089C4DA /* Build configuration list for PBXAggregateTarget "All tools" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				E9D659A51486FD650089C4DA /* Development */,
+				E9D659A61486FD650089C4DA /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		E9D659AC1486FFD10089C4DA /* Build configuration list for PBXAggregateTarget "All" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				E9D659AD1486FFD10089C4DA /* Development */,
+				E9D659AE1486FFD10089C4DA /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 		EEEFF3E50EFB6FDA00DBC955 /* Build configuration list for PBXNativeTarget "xarsig" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
    { (exit 1); exit 1; }; }
 fi
 
-have_libcrypto="1"
-
-for ac_header in openssl/evp.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to xar-devel@googlegroups.com ##
-## ----------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  have_libcrypto="0"
-fi
-
-done
-
-
-{ echo "$as_me:$LINENO: checking for OpenSSL_add_all_ciphers in -lcrypto" >&5
-echo $ECHO_N "checking for OpenSSL_add_all_ciphers in -lcrypto... $ECHO_C" >&6; }
-if test "${ac_cv_lib_crypto_OpenSSL_add_all_ciphers+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char OpenSSL_add_all_ciphers ();
-int
-main ()
-{
-return OpenSSL_add_all_ciphers ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_crypto_OpenSSL_add_all_ciphers=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_OpenSSL_add_all_ciphers=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_OpenSSL_add_all_ciphers" >&5
-echo "${ECHO_T}$ac_cv_lib_crypto_OpenSSL_add_all_ciphers" >&6; }
-if test $ac_cv_lib_crypto_OpenSSL_add_all_ciphers = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCRYPTO 1
-_ACEOF
-
-  LIBS="-lcrypto $LIBS"
-
-else
-  have_libcrypto="0"
-fi
-
-if test "x${have_libcrypto}" = "x0" ; then
-  { { echo "$as_me:$LINENO: error: Cannot build without libcrypto (OpenSSL)" >&5
-echo "$as_me: error: Cannot build without libcrypto (OpenSSL)" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
 have_libz="1"
 
 for ac_header in zlib.h
     cat >>$CONFIG_STATUS <<_ACEOF
     # First, check the format of the line:
     cat >"\$tmp/defines.sed" <<\\CEOF
-/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
+/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*/b def
 /^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
 b
 :def
 fi
 
 dnl 
-dnl Configure libcrypto (part of OpenSSL).
-dnl 
-have_libcrypto="1"
-AC_CHECK_HEADERS([openssl/evp.h], , [have_libcrypto="0"])
-AC_CHECK_LIB([crypto], [OpenSSL_add_all_ciphers], , [have_libcrypto="0"])
-if test "x${have_libcrypto}" = "x0" ; then
-  AC_MSG_ERROR([Cannot build without libcrypto (OpenSSL)])
-fi
-
-dnl 
 dnl Configure libz.
 dnl 
 have_libz="1"

xar/include/xar.h.in

 
 /* signature api for adding various signature types */
 xar_signature_t xar_signature_new(xar_t x,const char *type, int32_t length, xar_signer_callback callback, void *callback_context);
+/* extended signatures are ignored by previous versions of xar */
+xar_signature_t xar_signature_new_extended(xar_t x,const char *type, int32_t length, xar_signer_callback callback, void *callback_context);
 
 const char *xar_signature_type(xar_signature_t s);
 

xar/lib/archive.c

 #include <sys/stat.h>
 #include <arpa/inet.h> /* for ntoh{l,s} */
 #include <inttypes.h>  /* for PRIu64 */
+#include <time.h>
 #include <libxml/xmlwriter.h>
 #include <libxml/xmlreader.h>
 #include <libxml/xmlstring.h>
 #include "subdoc.h"
 #include "darwinattr.h"
 
+#ifdef __APPLE__
+#include <CommonCrypto/CommonDigest.h>
+#include <CommonCrypto/CommonDigestSPI.h>
+#include "hash.h"
+#endif
+
 #ifndef O_EXLOCK
 #define O_EXLOCK 0
 #endif
 	if( !file )
 		file = "-";
 	XAR(ret)->filename = strdup(file);
+#ifndef __APPLE__
 	OpenSSL_add_all_digests();
+#endif // __APPLE__
 	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];
+#ifdef __APPLE__
+        unsigned char toccksum[CC_SHA512_DIGEST_LENGTH]; // current biggest digest size  This is what OpenSSL uses
+        unsigned char cval[CC_SHA512_DIGEST_LENGTH]; // current biggest digest size  This is what OpenSSL uses
+#else
+        unsigned char toccksum[EVP_MAX_MD_SIZE];
 		unsigned char cval[EVP_MAX_MD_SIZE];
+#endif
 		unsigned int tlen;
+#ifndef __APPLE__
 		const EVP_MD *md;
+#endif // !__APPLE__
 
 		if( strcmp(file, "-") == 0 )
 			XAR(ret)->fd = 0;
 			break;
 		case XAR_CKSUM_SHA1:
 			XAR(ret)->docksum = 1;
+#ifdef __APPLE__
+            XAR(ret)->toc_ctx = digestRef_from_name("sha1", &XAR(ret)->toc_ctx_length);
+#else
 			md = EVP_get_digestbyname("sha1");
 			EVP_DigestInit(&XAR(ret)->toc_ctx, md);
+#endif
 			break;
 		case XAR_CKSUM_MD5:
 			XAR(ret)->docksum = 1;
+#ifdef __APPLE__
+            XAR(ret)->toc_ctx = digestRef_from_name("md5", &XAR(ret)->toc_ctx_length);
+#else
 			md = EVP_get_digestbyname("md5");
 			EVP_DigestInit(&XAR(ret)->toc_ctx, md);
+#endif
 			break;
 		default:
 			fprintf(stderr, "Unknown hashing algorithm, skipping\n");
 			
 		if( !XAR(ret)->docksum )
 			return ret;
-		
+
+#ifdef __APPLE__
+        CCDigestFinal(XAR(ret)->toc_ctx, toccksum);
+        CCDigestDestroy(XAR(ret)->toc_ctx);
+        XAR(ret)->toc_ctx = NULL;
+        tlen = XAR(ret)->toc_ctx_length;
+#else
 		EVP_DigestFinal(&XAR(ret)->toc_ctx, toccksum, &tlen);
+#endif
         
         /* if TOC specifies a location for the checksum, make sure that
          * we read the checksum from there: this is required for an archive
 		long rsize, wsize;
 		z_stream zs;
 		uint64_t ungztoc, gztoc;
+#ifdef __APPLE__
+        unsigned char chkstr[CC_SHA512_DIGEST_LENGTH]; // current biggest digest size  This is what OpenSSL uses
+#else        
 		unsigned char chkstr[EVP_MAX_MD_SIZE];
+#endif
 		int tocfd;
 		char timestr[128];
 		struct tm tmptm;
 		if( !tmpser ) tmpser = XAR_OPT_VAL_SHA1;
 
 		if( (strcmp(tmpser, XAR_OPT_VAL_NONE) != 0) ) {
+#ifndef __APPLE__
 			const EVP_MD *md;
+#endif // __APPLE__
 			xar_prop_set(XAR_FILE(x), "checksum", NULL);
 			if( strcmp(tmpser, XAR_OPT_VAL_SHA1) == 0 ) {
+#ifdef __APPLE__
+                XAR(x)->toc_ctx = digestRef_from_name("sha1", &XAR(x)->toc_ctx_length);
+#else
 				md = EVP_get_digestbyname("sha1");
 				EVP_DigestInit(&XAR(x)->toc_ctx, md);
+#endif
 				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 ) {
+#ifdef __APPLE__
+                XAR(x)->toc_ctx = digestRef_from_name("md5", &XAR(x)->toc_ctx_length);
+#else
 				md = EVP_get_digestbyname("md5");
 				EVP_DigestInit(&XAR(x)->toc_ctx, md);
+#endif
 				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");
 					goto CLOSEEND;
 				}
 				if( XAR(x)->docksum )
+#ifdef __APPLE__
+                    CCDigestUpdate(XAR(x)->toc_ctx, ((char*)wbuf)+off, r);
+#else
 					EVP_DigestUpdate(&XAR(x)->toc_ctx, ((char*)wbuf)+off, r);
+#endif // __APPLE__
 				off += r;
 				gztoc += r;
 			} while( off < wbytes );
 		r = write(tocfd, wbuf, wsize - zs.avail_out);
 		gztoc += r;
 		if( XAR(x)->docksum )
+#ifdef __APPLE__
+            CCDigestUpdate(XAR(x)->toc_ctx, wbuf, r);
+#else
 			EVP_DigestUpdate(&XAR(x)->toc_ctx, wbuf, r);
+#endif // __APPLE__
 		
 		deflateEnd(&zs);
 
 			unsigned int l = r;
 			
 			memset(chkstr, 0, sizeof(chkstr));
+#ifdef __APPLE__
+            CCDigestFinal(XAR(x)->toc_ctx, chkstr);
+            CCDigestDestroy(XAR(x)->toc_ctx);
+            XAR(x)->toc_ctx = NULL;
+            l = XAR(x)->toc_ctx_length;
+#else
 			EVP_DigestFinal(&XAR(x)->toc_ctx, chkstr, &l);
+#endif
 			r = l;
 			write(XAR(x)->fd, chkstr, r);
 		}
 			return ret;
 
 		if ( XAR(x)->docksum )
+#ifdef __APPLE__
+            CCDigestUpdate(XAR(x)->toc_ctx, XAR(x)->readbuf, ret);
+#else
 			EVP_DigestUpdate(&XAR(x)->toc_ctx, XAR(x)->readbuf, ret);
+#endif
 
 		XAR(x)->toc_count += ret;
 		off += ret;

xar/lib/archive.h

 #define _XAR_ARCHIVE_H_
 #include <zlib.h>
 #include <libxml/hash.h>
+#ifdef __APPLE__
+#include <CommonCrypto/CommonDigest.h>
+#include <CommonCrypto/CommonDigestSPI.h>
+#else
 #include <openssl/evp.h>
+#endif
 #include <sys/types.h>
 #include <sys/stat.h>
 #include "xar.h"
 	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 */
+#ifdef __APPLE__
+    CCDigestRef toc_ctx;
+    unsigned int toc_ctx_length;
+#else
 	EVP_MD_CTX toc_ctx;
+#endif // !__APPLE__
 	int docksum;
 	int skipwarn;
 	struct stat sbcache;
 #include <string.h>
 #include <sys/types.h>
 #include <zlib.h>
+#ifdef __APPLE__
+#include <CommonCrypto/CommonDigest.h>
+#include <CommonCrypto/CommonDigestSPI.h>
+#else
 #include <openssl/evp.h>
+#endif
 
 #include "xar.h"
 #include "hash.h"
 #include "asprintf.h"
 #endif
 
+#ifdef __APPLE__
+
+// The following value is of coure tweakable but this should serve for now.
+#define MAX_HASH_NAME_LENGTH 32 
+
+CCDigestRef digestRef_from_name(const char* name, unsigned int *outHashSize)
+{
+    CCDigestRef result = NULL;
+    
+    if (NULL != outHashSize)
+    {
+        *outHashSize = 0;
+    }
+    
+    if (!strcasecmp(name, "sha") || !strcasecmp(name, "sha1"))
+    {
+        result = CCDigestCreate(kCCDigestSHA1);
+        if (NULL != outHashSize)
+        {
+            *outHashSize = CC_SHA1_DIGEST_LENGTH;
+        }
+    }
+    else if (!strcasecmp(name, "md5"))
+    {
+        result = CCDigestCreate(kCCDigestMD5);
+        if (NULL != outHashSize)
+        {
+            *outHashSize = CC_MD5_DIGEST_LENGTH;
+        }
+    }
+    else if (!strcasecmp(name, "md2"))
+    {
+        result = CCDigestCreate(kCCDigestMD2); 
+        if (NULL != outHashSize)
+        {
+            *outHashSize = CC_MD2_DIGEST_LENGTH;
+        }
+    }
+    
+    return result;
+                
+}
+#endif // __APPLE__
+
 
 struct _hash_context{
+#ifdef __APPLE__
+    CCDigestRef unarchived_cts;
+    const char unarchived_ctx_name[MAX_HASH_NAME_LENGTH];
+    unsigned int unarchived_digest_size;
+    CCDigestRef archived_cts;
+    const char archived_ctx_name[MAX_HASH_NAME_LENGTH];
+    unsigned int archived_digest_size;
+#else
 	EVP_MD_CTX unarchived_cts;
 	EVP_MD_CTX archived_cts;
+#endif // !__APPLE__
 	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;
+#ifndef __APPLE__
+ 	const EVP_MD *md;
+#endif // !__APPLE__
+    
 	xar_prop_t tmpp;
 
 	opt = NULL;
 	
 	if(!CONTEXT(context)){
 		*context = calloc(1,sizeof(struct _hash_context));
+#ifndef __APPLE__
 		OpenSSL_add_all_digests();
+#endif // !__APPLE__
 	}
 	
 	if( !CONTEXT(context)->unarchived ){
+
+#ifdef __APPLE__
+        CONTEXT(context)->unarchived_cts = digestRef_from_name(opt, &CONTEXT(context)->unarchived_digest_size);
+        if (NULL == CONTEXT(context)->unarchived_cts)  return -1;
+        strncpy((char *)(CONTEXT(context)->unarchived_ctx_name), opt, MAX_HASH_NAME_LENGTH);
+#else
 		md = EVP_get_digestbyname(opt);
 		if( md == NULL ) return -1;
 		EVP_DigestInit(&(CONTEXT(context)->unarchived_cts), md);
-		CONTEXT(context)->unarchived = 1;		
+#endif // __APPLE__
+		CONTEXT(context)->unarchived = 1;	
+
 	}
 		
 	if( inlen == 0 )
 		return 0;
 	
 	CONTEXT(context)->count += inlen;
+#ifdef __APPLE__
+    CCDigestUpdate(CONTEXT(context)->unarchived_cts, in, inlen);
+#else
 	EVP_DigestUpdate(&(CONTEXT(context)->unarchived_cts), in, inlen);
+#endif // __APPLE__
 	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;
+#ifndef __APPLE__
 	const EVP_MD *md;
+#endif
 	xar_prop_t tmpp;
 	
 	opt = NULL;
 		
 	if(!CONTEXT(context)){
 		*context = calloc(1,sizeof(struct _hash_context));
+#ifndef __APPLE__
 		OpenSSL_add_all_digests();
+#endif // !__APPLE__
 	}
 	
 	if ( !CONTEXT(context)->archived ){
+#ifdef __APPLE__
+        CONTEXT(context)->archived_cts = digestRef_from_name(opt, &CONTEXT(context)->archived_digest_size);
+        if (NULL == CONTEXT(context)->archived_cts) return -1;
+        strncpy((char *)(CONTEXT(context)->archived_ctx_name), opt, MAX_HASH_NAME_LENGTH);
+#else
 		md = EVP_get_digestbyname(opt);
 		if( md == NULL ) return -1;
-		EVP_DigestInit(&(CONTEXT(context)->archived_cts), md);		
+		EVP_DigestInit(&(CONTEXT(context)->archived_cts), md);	
+#endif
 		CONTEXT(context)->archived = 1;		
 	}
 
 		return 0;
 
 	CONTEXT(context)->count += inlen;
+#ifdef __APPLE__
+    CCDigestUpdate(CONTEXT(context)->archived_cts, in, inlen);
+#else
 	EVP_DigestUpdate(&(CONTEXT(context)->archived_cts), in, inlen);
+#endif // __APPLE__
 	return 0;
 }
 
 int32_t xar_hash_done(xar_t x, xar_file_t f, xar_prop_t p, void **context) {
+#ifdef __APPLE__
+    unsigned char hashstr[CC_SHA512_DIGEST_LENGTH]; // current biggest digest size  This is what OpenSSL uses
+#else
 	unsigned char hashstr[EVP_MAX_MD_SIZE];
+#endif // __APPLE__
 	char *str;
 	unsigned int len;
 	xar_prop_t tmpp;
 		goto DONE;
 
 	if( CONTEXT(context)->unarchived ){
+#ifdef __APPLE__
+        CCDigestRef ctx  = CONTEXT(context)->unarchived_cts;
+        const char *type  = CONTEXT(context)->unarchived_ctx_name;
+#else
 		EVP_MD_CTX		*ctx = &CONTEXT(context)->unarchived_cts;
 		const EVP_MD			*md = EVP_MD_CTX_md(ctx);
-		const char *type = EVP_MD_name(md);
+        const char *type = EVP_MD_name(md);
+#endif // __APPLE__
+ 
+		
 
 		memset(hashstr, 0, sizeof(hashstr));
+#ifdef __APPLE__
+        CCDigestFinal(CONTEXT(context)->unarchived_cts, hashstr);
+        CCDigestDestroy(CONTEXT(context)->unarchived_cts);
+        CONTEXT(context)->unarchived_cts = NULL;
+        len = CONTEXT(context)->unarchived_digest_size;
+#else
 		EVP_DigestFinal(&(CONTEXT(context)->unarchived_cts), hashstr, &len);
+#endif
 		str = xar_format_hash(hashstr,len);
 		if( f ) {
 			tmpp = xar_prop_pset(f, p, "extracted-checksum", str);
 	}
 
 	if( CONTEXT(context)->archived ){
+#ifdef __APPLE__
+        const char		*type = CONTEXT(context)->archived_ctx_name;
+#else
 		EVP_MD_CTX				*ctx = &CONTEXT(context)->archived_cts;
 		const EVP_MD			*md = EVP_MD_CTX_md(ctx);
 		const char		*type = EVP_MD_name(md);
+#endif // __APPLE__
 		
 		memset(hashstr, 0, sizeof(hashstr));
+#ifdef __APPLE__
+        CCDigestFinal(CONTEXT(context)->archived_cts, hashstr);
+        CCDigestDestroy(CONTEXT(context)->archived_cts);
+        CONTEXT(context)->archived_cts = NULL;
+        len = CONTEXT(context)->archived_digest_size;
+#else
 		EVP_DigestFinal(&(CONTEXT(context)->archived_cts), hashstr, &len);
+#endif
+        
 		str = xar_format_hash(hashstr,len);
 		if( f ) {
 			tmpp = xar_prop_pset(f, p, "archived-checksum", str);
 }
 
 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;
+#ifdef __APPLE__
+    unsigned char hashstr[CC_SHA512_DIGEST_LENGTH]; // current biggest digest size  This is what OpenSSL uses
+#else
 	unsigned char hashstr[EVP_MAX_MD_SIZE];
+#endif // __APPLE__
+    
 	unsigned int len;
 	char *tmpstr;
+#ifndef __APPLE__
 	const EVP_MD *md;
+#endif
 	int32_t err = 0;
 	xar_prop_t tmpp;
 
 			uncompstyle = xar_attr_pget(f, tmpp, "style");
 			uncomp = xar_prop_getvalue(tmpp);
 		}
-		
+
+#ifdef __APPLE__        
+        if (uncomp && uncompstyle && CONTEXT(context)->archived ) {
+#else        
 		md = EVP_get_digestbyname(uncompstyle);
+		if( uncomp && uncompstyle && md && CONTEXT(context)->archived ) {
+#endif // __APPLE__
 
-		if( uncomp && uncompstyle && md && CONTEXT(context)->archived ) {
 			char *str;
 			memset(hashstr, 0, sizeof(hashstr));
+#ifdef __APPLE__
+            CCDigestFinal(CONTEXT(context)->archived_cts, hashstr);
+            CCDigestDestroy(CONTEXT(context)->archived_cts);
+            CONTEXT(context)->archived_cts = NULL;
+            len = CONTEXT(context)->archived_digest_size;
+#else
 			EVP_DigestFinal(&(CONTEXT(context)->archived_cts), hashstr, &len);
+#endif // __APPLE__
 			str = xar_format_hash(hashstr,len);
 			if(strcmp(uncomp, str) != 0) {
 				xar_err_new(x);
 	}
 	
 	if( CONTEXT(context)->unarchived )
+#ifdef __APPLE__
+        CCDigestFinal(CONTEXT(context)->unarchived_cts, hashstr);
+        CCDigestDestroy(CONTEXT(context)->unarchived_cts);
+        CONTEXT(context)->unarchived_cts = NULL;
+		len = CONTEXT(context)->unarchived_digest_size;
+#else
 	    EVP_DigestFinal(&(CONTEXT(context)->unarchived_cts), hashstr, &len);
+#endif // __APPLE__
 
 	if(*context){
 		free(*context);
 int32_t xar_hash_done(xar_t x, xar_file_t f, xar_prop_t p, void **context);
 int32_t xar_hash_out_done(xar_t x, xar_file_t f, xar_prop_t p, void **context);
 
+#ifdef __APPLE__
+CCDigestRef digestRef_from_name(const char* name, unsigned int *outHashSize);
+#endif
+
 #endif /* _XAR_HASH_H_ */

xar/lib/signature.c

 	off_t offset;
 };
 
-
+#ifdef __APPLE__
+xar_signature_t xar_signature_new_internal(xar_t x, int is_extended, const char *type, int32_t length, xar_signer_callback callback, void *callback_context)
+#else
 xar_signature_t xar_signature_new(xar_t x,const char *type, int32_t length, xar_signer_callback callback, void *callback_context)
+#endif
 {
 	xar_signature_t ret;
 		
 	XAR_SIGNATURE(ret)->offset = XAR(x)->heap_offset;
 	XAR_SIGNATURE(ret)->signer_callback = callback;
 	XAR_SIGNATURE(ret)->callback_context = callback_context;
+#ifdef __APPLE__
+    XAR_SIGNATURE(ret)->is_extended = is_extended;
+#endif
 	
 	/* Pre allocate space in the heap */
 	XAR(x)->heap_offset += length;
 	
 }
 
+#ifdef __APPLE__
+xar_signature_t xar_signature_new(xar_t x,const char *type, int32_t length, xar_signer_callback callback, void *callback_context)
+{
+    return xar_signature_new_internal(x, 0, type, length, callback, callback_context);
+}
+#endif
+
+xar_signature_t xar_signature_new_extended(xar_t x,const char *type, int32_t length, xar_signer_callback callback, void *callback_context)
+{
+#ifdef __APPLE__
+    return xar_signature_new_internal(x, 1, type, length, callback, callback_context);
+#else
+    return xar_signature_new(x, type, length, callback, callback_context);
+#endif
+}
+
 const char *xar_signature_type(xar_signature_t s)
 {
 	if( !s )
 xar_signature_t xar_signature_unserialize(xar_t x, xmlTextReaderPtr reader)
 {
 	struct __xar_signature_t *ret = NULL;
+#ifdef __APPLE__
+    const xmlChar *sig_type = NULL;
+#endif
 	const xmlChar *value = NULL;
 	const xmlChar *name = NULL;
 	int type;
 	ret->x = x;
 	
 	/* Read One Signature Element */
+#ifdef __APPLE__
+    sig_type = xmlTextReaderConstLocalName(reader);
+    if(strcmp((const char*)sig_type, "x-signature") == 0) {
+        ret->is_extended = 1;
+    }
+#endif
 		
 	/* Retrieve the type attr */
 	value = xmlTextReaderGetAttribute(reader, (const xmlChar*)"style");
 	if( !sig ) return 0;
 
 	/* <signature type='EncryptionAlgorithm'> */
+#ifdef __APPLE__
+    const char* element_name = XAR_SIGNATURE(sig)->is_extended ? "x-signature" : "signature";
+	xmlTextWriterStartElementNS( writer, NULL, BAD_CAST(element_name), NULL);
+#else
 	xmlTextWriterStartElementNS( writer, NULL, BAD_CAST("signature"), NULL);		
+#endif
 	
 	/* write out the style */
 	xmlTextWriterWriteAttribute(writer, BAD_CAST("style"), BAD_CAST(XAR_SIGNATURE(sig)->type));

xar/lib/signature.h

 	xar_signer_callback signer_callback;		/* callback for signing */
 	void	*callback_context;					/* context for callback */
 	xar_t x;
+#ifdef __APPLE__
+    int is_extended;
+#endif
 };
 
 #define XAR_SIGNATURE(x) ((struct __xar_signature_t *)(x))
 
+#ifdef __APPLE__
+xar_signature_t xar_signature_new_internal(xar_t x, int is_extended, const char *type, int32_t length, xar_signer_callback callback, void *callback_context);
+#endif
+
 int32_t xar_signature_serialize(xar_signature_t sig, xmlTextWriterPtr writer);
 xar_signature_t xar_signature_unserialize(xar_t x, xmlTextReaderPtr reader);
 
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
+#include <time.h>
 #include "config.h"
 #ifndef HAVE_ASPRINTF
 #include "asprintf.h"
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.