diff --git a/CHANGELOG b/CHANGELOG index 401acdf3..889b2e63 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,9 @@ -# 1.13.0 +# 1.13.0 (Dec 18, 2015) * Changed framework's bundle ID from `org.andymatuschak.Sparkle` to `org.sparkle-project.Sparkle`. -# 1.12.0 +# 1.12.0 (Dec 13, 2015) * Rewritten file operations for updating an app (Zorg) - Ensuring atomic move operations, robust error handling. @@ -47,11 +47,11 @@ * Disallowed automatic updates when user can't write to the bundle (Zorg) * Set the task working directories instead of changing the process working directory (Kevin Wojniak) -# 1.11.1 +# 1.11.1 (Nov 9, 2015) * Don't install automatic updates when system is about to shut down -# 1.11.0 +# 1.11.0 (Aug 24, 2015) * Big improvements to code signing and DSA verification - Sparkle now checks not only whether an update is correctly signed, but also whether the updated version will be able to verify future updates. Updates now must either use DSA keys correctly, or not try to use them at all. Same goes for Apple Code Signing. @@ -69,7 +69,7 @@ * Added logging of appcast/download URL on error (Kornel Lesiński) * More robust reading of Autoupdate.app path from Sparkle bundle -# 1.10.0 +# 1.10.0 (Apr 26, 2015) * Massive improvements to the BinaryDelta tool (Zorg) - Ability to track file permissions (Zorg) @@ -85,7 +85,7 @@ * Stdout used for non error outputs (JDuquennoy) * French locale update (Kent Sutherland) -# 1.9.0 +# 1.9.0 (Jan 26, 2015) * Added SUUpdater delegate method for failures. (Benjamin Gordon) * Make the error definitions public (C.W. Betts) @@ -95,7 +95,7 @@ * Use Library/Caches rather than app support directory (Kornel Lesiński) * Check for a modal window being onscreen before trying to put up the Sparkle prompt (Alf Watt) * Fixed crashes on 10.7 (Chris Campbell, Ger Teunis) -* Fixed Sparkle tags parsing (Tamás Lustyik) +* Fixed Sparkle tags parsing (Tamás Lustyik) * SULog code cleanups (Kevin Wojniak) * Make sure CFBundleVersion is a semantic version number. (Jake Petroules) * Replace typedef enums with typedef NS_ENUM to make Swift happier (C.W. Betts) @@ -108,7 +108,7 @@ * Turkish localization fixes (Emir) * Proofing of Ukrainian localization (Vera Tkachenko) -# 1.8.0 +# 1.8.0 (Jul 26, 2014) * New SUDSAVerifier based on up-to-date OS X APIs (Zachary Waldowski) * Detailed error log for failed signature checks (Kornel Lesiński) @@ -119,7 +119,7 @@ * Updated Japanese localization (1024jp) * Added Greek localization -# 1.7.1 +# 1.7.1 (Jul 2, 2014) * Removed option to install unverified updates (Kornel Lesiński) * Added detailed log when code signing verification fails (Sam Deane) diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 3f751fdc..4ba80bc0 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -16,7 +16,7 @@ SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0 SPARKLE_VERSION_MAJOR = 1 SPARKLE_VERSION_MINOR = 13 -SPARKLE_VERSION_PATCH = 0 +SPARKLE_VERSION_PATCH = 1 SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH) CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION) diff --git a/Sparkle.podspec b/Sparkle.podspec index df5d5032..faa0334d 100644 --- a/Sparkle.podspec +++ b/Sparkle.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Sparkle" - s.version = "1.11.1" + s.version = "1.13.0" s.summary = "A software update framework for OS X" s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers." s.homepage = "http://sparkle-project.org" diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index ba8a5990..28f1e5c4 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -146,6 +146,8 @@ 55C14F9A136F045400649790 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; }; 55C14FC7136F05E100649790 /* Sparkle.strings in Resources */ = {isa = PBXBuildFile; fileRef = 61AAE8220A321A7F00D8810D /* Sparkle.strings */; }; 55E6F33319EC9F6C00005E76 /* SUErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 55E6F33219EC9F6C00005E76 /* SUErrors.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5AE459001C34118500E3BB47 /* SUUpdaterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 14950074195FDF5900BC5B5B /* SUUpdaterTest.m */; }; + 5AE459021C34118500E3BB47 /* SUVersionComparisonTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 61227A150DB548B800AB99EA /* SUVersionComparisonTest.m */; }; 5AF6C74F1AEA46D10014A3AB /* test.sparkle_guided.pkg in Resources */ = {isa = PBXBuildFile; fileRef = 5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */; }; 5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */; }; 5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */; }; @@ -255,7 +257,6 @@ 7275F9C21B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; }; 7275F9C31B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; }; 72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */; }; - 72A4A2411BB656FA00E7820D /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; }; 72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */; }; 72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */; }; 72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */; }; @@ -272,6 +273,8 @@ 767B61AD1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; }; 767B61AE1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; }; A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */; }; + C23E885A1BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg in Resources */ = {isa = PBXBuildFile; fileRef = C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */; }; + C23E885B1BE7B24F0050BB73 /* SparkleTestCodeSignApp.enc.dmg in Resources */ = {isa = PBXBuildFile; fileRef = C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */; }; F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */; }; F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */ = {isa = PBXBuildFile; fileRef = F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */; }; F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */; }; @@ -731,6 +734,7 @@ 8DC2EF5B0486A6940098B216 /* Sparkle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Sparkle.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A5BF4F1B1BC7668B007A052A /* SUTestWebServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUTestWebServer.h; sourceTree = ""; }; A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUTestWebServer.m; sourceTree = ""; }; + C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */ = {isa = PBXFileReference; lastKnownFileType = file; path = SparkleTestCodeSignApp.enc.dmg; sourceTree = ""; }; F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUCodeSigningVerifierTest.m; sourceTree = ""; }; F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = SparkleTestCodeSignApp.zip; sourceTree = ""; }; FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigFrameworkDebug.xcconfig; sourceTree = ""; }; @@ -993,6 +997,7 @@ children = ( 14958C6B19AEBC530061B14F /* signed-test-file.txt */, 72AC6B2D1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg */, + C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */, 72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */, 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */, 72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */, @@ -1147,10 +1152,10 @@ 14652F8319A9759F00959E44 /* SUExport.h */, 61EF67580E25C5B400F754E0 /* SUHost.h */, 61EF67550E25B58D00F754E0 /* SUHost.m */, - 726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */, - 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */, 55C14F04136EF6DB00649790 /* SULog.h */, 55C14F05136EF6DB00649790 /* SULog.m */, + 726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */, + 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */, ); includeInIndex = 1; name = "Other Sources"; @@ -1166,10 +1171,10 @@ 72E45CFB1B641961005C701A /* sparkletestcast.xml */, 72E45CF11B640CDD005C701A /* SUTestApplicationDelegate.h */, 72E45CF21B640CDD005C701A /* SUTestApplicationDelegate.m */, - 72E45CF41B640DAE005C701A /* SUUpdateSettingsWindowController.h */, - 72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.m */, A5BF4F1B1BC7668B007A052A /* SUTestWebServer.h */, A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */, + 72E45CF41B640DAE005C701A /* SUUpdateSettingsWindowController.h */, + 72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.m */, 72E45CF61B640DAE005C701A /* SUUpdateSettingsWindowController.xib */, 72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */, 14732BBF1960F0AC00593899 /* test_app_only_dsa_pub.pem */, @@ -1632,6 +1637,7 @@ files = ( 14958C6E19AEBC950061B14F /* signed-test-file.txt in Resources */, 72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */, + C23E885B1BE7B24F0050BB73 /* SparkleTestCodeSignApp.enc.dmg in Resources */, 72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */, 72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */, 72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */, @@ -1694,6 +1700,7 @@ buildActionMask = 2147483647; files = ( 61AAE8280A321A7F00D8810D /* Sparkle.strings in Resources */, + C23E885A1BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg in Resources */, 55C14BEE136EF20D00649790 /* SUAutomaticUpdateAlert.xib in Resources */, 615AE3D00D64DC40001CA7BD /* SUModelTranslation.plist in Resources */, 55C14BEF136EF21700649790 /* SUStatus.xib in Resources */, @@ -1862,7 +1869,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 726F2CE71BC9C3E2001971A4 /* SUOperatingSystem.m in Sources */, 55C14BD4136EEFCE00649790 /* Autoupdate.m in Sources */, F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */, 55C14F00136EF6B700649790 /* SUConstants.m in Sources */, @@ -1871,6 +1877,7 @@ 55C14F0C136EF6EA00649790 /* SUHost.m in Sources */, 55C14F0D136EF6F200649790 /* SUInstaller.m in Sources */, 55C14F08136EF6DB00649790 /* SULog.m in Sources */, + 726F2CE71BC9C3E2001971A4 /* SUOperatingSystem.m in Sources */, 55C14F24136EF86F00649790 /* SUPackageInstaller.m in Sources */, 55C14F21136EF84D00649790 /* SUPlainInstaller.m in Sources */, 55C14F22136EF86000649790 /* SUStandardVersionComparator.m in Sources */, @@ -1884,9 +1891,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 726F2CE91BC9C499001971A4 /* SUOperatingSystem.m in Sources */, - 726F2CE81BC9C48F001971A4 /* SUConstants.m in Sources */, - 726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */, 5D06E8E90FD68CDB005AE3F6 /* bsdiff.c in Sources */, 14652F7E19A9728A00959E44 /* bspatch.c in Sources */, 7223E7631AD1AEFF008E3161 /* sais.c in Sources */, @@ -1894,6 +1898,9 @@ 14652F7C19A9725300959E44 /* SUBinaryDeltaCommon.m in Sources */, 7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */, 5D06E8EA0FD68CDB005AE3F6 /* SUBinaryDeltaTool.m in Sources */, + 726F2CE81BC9C48F001971A4 /* SUConstants.m in Sources */, + 726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */, + 726F2CE91BC9C499001971A4 /* SUOperatingSystem.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1908,11 +1915,12 @@ 142E0E0919A83AAC00E4312B /* SUBinaryDeltaTest.m in Sources */, F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */, 5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */, - 72A4A2411BB656FA00E7820D /* SUFileManager.m in Sources */, 72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */, 5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */, 14652F8219A9746000959E44 /* SULog.m in Sources */, 7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */, + 5AE459001C34118500E3BB47 /* SUUpdaterTest.m in Sources */, + 5AE459021C34118500E3BB47 /* SUVersionComparisonTest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1920,10 +1928,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 726F2CEB1BC9C733001971A4 /* SUConstants.m in Sources */, 61B5F93009C4CFDC00B25A18 /* main.m in Sources */, - A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */, + 726F2CEB1BC9C733001971A4 /* SUConstants.m in Sources */, 72E45CF31B640CDD005C701A /* SUTestApplicationDelegate.m in Sources */, + A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */, 72E45CF71B640DAE005C701A /* SUUpdateSettingsWindowController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1951,13 +1959,13 @@ 61EF67560E25B58D00F754E0 /* SUHost.m in Sources */, 618FA5020DAE88B40026945C /* SUInstaller.m in Sources */, 55C14F07136EF6DB00649790 /* SULog.m in Sources */, + 726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */, 618FA5230DAE8E8A0026945C /* SUPackageInstaller.m in Sources */, 61D85D6D0E10B2ED00F9B4A9 /* SUPipedUnarchiver.m in Sources */, 33545B9C1B46A5430059250D /* SUXPCInstaller.m in Sources */, 618FA5060DAE8AB80026945C /* SUPlainInstaller.m in Sources */, 6101347C0DD2541A0049ACDF /* SUProbingUpdateDriver.m in Sources */, 61B93C0A0DD112FF00DCD2F8 /* SUScheduledUpdateDriver.m in Sources */, - 726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */, 61A225A50D1C4AC000430CCD /* SUStandardVersionComparator.m in Sources */, 6196CFFA09C72149000DC222 /* SUStatusController.m in Sources */, 61A2279D0D1CEE7600430CCD /* SUSystemProfiler.m in Sources */, diff --git a/Sparkle/SUAppcast.h b/Sparkle/SUAppcast.h index 8f3efc8e..a035f18f 100644 --- a/Sparkle/SUAppcast.h +++ b/Sparkle/SUAppcast.h @@ -19,6 +19,7 @@ SU_EXPORT @interface SUAppcast : NSObject @property (copy) NSDictionary *httpHeaders; - (void)fetchAppcastFromURL:(NSURL *)url completionBlock:(void (^)(NSError *))err; +- (SUAppcast *)copyWithoutDeltaUpdates; @property (readonly, copy) NSArray *items; @end diff --git a/Sparkle/SUAppcast.m b/Sparkle/SUAppcast.m index dced1da7..cd44a25b 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -102,7 +102,7 @@ if (self.downloadFilename) { NSUInteger options = 0; - options = NSXMLNodeLoadExternalEntitiesSameOriginOnly; + options = NSXMLNodeLoadExternalEntitiesNever; // Prevent inclusion from file:// document = [[NSXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:self.downloadFilename] options:options error:&error]; [[NSFileManager defaultManager] removeItemAtPath:self.downloadFilename error:nil]; @@ -287,4 +287,16 @@ return nodes[i]; } +- (SUAppcast *)copyWithoutDeltaUpdates { + SUAppcast *other = [SUAppcast new]; + NSMutableArray *nonDeltaItems = [NSMutableArray new]; + + for(SUAppcastItem *item in self.items) { + if (![item isDeltaUpdate]) [nonDeltaItems addObject:item]; + } + + other.items = nonDeltaItems; + return other; +} + @end diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index 7ee42020..a98d7afa 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -134,7 +134,8 @@ } if (enclosureURLString) { - NSString *fileURLString = [[enclosureURLString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + // Sparkle used to always URL-encode, so for backwards compatibility spaces in URLs must be forgiven. + NSString *fileURLString = [enclosureURLString stringByReplacingOccurrencesOfString:@" " withString:@"%20"]; self.fileURL = [NSURL URLWithString:fileURLString]; } if (enclosure) { @@ -159,7 +160,12 @@ // Find the appropriate release notes URL. NSString *releaseNotesString = dict[SUAppcastElementReleaseNotesLink]; if (releaseNotesString) { - self.releaseNotesURL = [NSURL URLWithString:releaseNotesString]; + NSURL *url = [NSURL URLWithString:releaseNotesString]; + if ([url isFileURL]) { + SULog(@"Release notes with file:// URLs are not supported"); + } else { + self.releaseNotesURL = url; + } } else if ([self.itemDescription hasPrefix:@"http://"] || [self.itemDescription hasPrefix:@"https://"]) { // if the description starts with http:// or https:// use that. self.releaseNotesURL = [NSURL URLWithString:self.itemDescription]; } else { diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 7c570dff..00b5d9dc 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -140,19 +140,26 @@ CF_EXPORT CFDictionaryRef DMCopyHTTPRequestHeaders(CFBundleRef appBundle, CFData if ([[self.updater delegate] respondsToSelector:@selector(bestValidUpdateInAppcast:forUpdater:)]) // Does the delegate want to handle it? { item = [[self.updater delegate] bestValidUpdateInAppcast:ac forUpdater:self.updater]; + if ([item isDeltaUpdate]) { + self.nonDeltaUpdateItem = [[self.updater delegate] bestValidUpdateInAppcast:[ac copyWithoutDeltaUpdates] forUpdater:self.updater]; + } } else // If not, we'll take care of it ourselves. { // Find the first update we can actually use. - NSEnumerator *updateEnumerator = [[ac items] objectEnumerator]; - do { - item = [updateEnumerator nextObject]; - } while (item && ![self hostSupportsItem:item]); + for(SUAppcastItem *i in ac.items) { + if ([self hostSupportsItem:i]) { + item = i; + break; + } + } - SUAppcastItem *deltaUpdateItem = [item deltaUpdates][[self.host version]]; - if (deltaUpdateItem && [self hostSupportsItem:deltaUpdateItem]) { - self.nonDeltaUpdateItem = item; - item = deltaUpdateItem; + if (item) { + SUAppcastItem *deltaUpdateItem = [item deltaUpdates][[self.host version]]; + if (deltaUpdateItem && [self hostSupportsItem:deltaUpdateItem]) { + self.nonDeltaUpdateItem = item; + item = deltaUpdateItem; + } } } @@ -373,7 +380,7 @@ CF_EXPORT CFDictionaryRef DMCopyHTTPRequestHeaders(CFBundleRef appBundle, CFData - (void)extractUpdate { - SUUnarchiver *unarchiver = [SUUnarchiver unarchiverForPath:self.downloadPath updatingHostBundlePath:[[self.host bundle] bundlePath]]; + SUUnarchiver *unarchiver = [SUUnarchiver unarchiverForPath:self.downloadPath updatingHostBundlePath:[[self.host bundle] bundlePath] withPassword:self.updater.decryptionPassword]; if (!unarchiver) { SULog(@"Error: No valid unarchiver for %@!", self.downloadPath); [self unarchiverDidFail:nil]; diff --git a/Sparkle/SUDiskImageUnarchiver.m b/Sparkle/SUDiskImageUnarchiver.m index 2eca677d..1a90fb33 100644 --- a/Sparkle/SUDiskImageUnarchiver.m +++ b/Sparkle/SUDiskImageUnarchiver.m @@ -69,8 +69,21 @@ promptData = [NSData dataWithBytes:"yes\n" length:4]; NSString *hdiutilPath = @"/usr/bin/hdiutil"; - NSArray *arguments = @[@"attach", self.archivePath, @"-mountpoint", mountPoint, /*@"-noverify",*/ @"-nobrowse", @"-noautoopen"]; NSString *currentDirPath = @"/"; + NSArray *arguments = @[@"attach", self.archivePath, @"-mountpoint", mountPoint, /*@"-noverify",*/ @"-nobrowse", @"-noautoopen"]; + + if (self.decryptionPassword) { + NSMutableData *passwordData = [[self.decryptionPassword dataUsingEncoding:NSUTF8StringEncoding] mutableCopy]; + // From the hdiutil docs: + // read a null-terminated passphrase from standard input + // + // Add the null terminator, then the newline + [passwordData appendData:[NSData dataWithBytes:"\0" length:1]]; + [passwordData appendData:promptData]; + promptData = passwordData; + + arguments = [arguments arrayByAddingObject:@"-stdinpass"]; + } BOOL shouldUseXPC = SUShouldUseXPCInstaller(); diff --git a/Sparkle/SUUIBasedUpdateDriver.h b/Sparkle/SUUIBasedUpdateDriver.h index 65f37443..8148912b 100644 --- a/Sparkle/SUUIBasedUpdateDriver.h +++ b/Sparkle/SUUIBasedUpdateDriver.h @@ -17,7 +17,7 @@ @interface SUUIBasedUpdateDriver : SUBasicUpdateDriver -- (void)showModalAlert:(NSAlert *)alert; +- (void)showAlert:(NSAlert *)alert; - (IBAction)cancelDownload:(id)sender; - (void)installAndRestart:(id)sender; diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index 629ef0e4..5a7a12e6 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -107,7 +107,7 @@ alert.messageText = SULocalizedString(@"You're up-to-date!", "Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates."); alert.informativeText = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [self.host name], [self.host displayVersion]]; [alert addButtonWithTitle:SULocalizedString(@"OK", nil)]; - [self showModalAlert:alert]; + [self showAlert:alert]; [self abortUpdate:SUUpdateAbortDidNotFind]; } } @@ -263,7 +263,7 @@ alert.messageText = SULocalizedString(@"Update Error!", nil); alert.informativeText = [NSString stringWithFormat:@"%@", [error localizedDescription]]; [alert addButtonWithTitle:SULocalizedString(@"Cancel Update", nil)]; - [self showModalAlert:alert]; + [self showAlert:alert]; [super abortUpdateWithError:error]; } @@ -277,7 +277,7 @@ [super abortUpdate:reason]; } -- (void)showModalAlert:(NSAlert *)alert +- (void)showAlert:(NSAlert *)alert { if ([self.updater.delegate respondsToSelector:@selector(updater:mayShowModalAlert:)] && ![self.updater.delegate updater:self.updater mayShowModalAlert:alert]) diff --git a/Sparkle/SUUnarchiver.h b/Sparkle/SUUnarchiver.h index 6397fe71..ccd5611d 100644 --- a/Sparkle/SUUnarchiver.h +++ b/Sparkle/SUUnarchiver.h @@ -18,9 +18,10 @@ @property (copy, readonly) NSString *archivePath; @property (copy, readonly) NSString *updateHostBundlePath; +@property (copy, readonly) NSString *decryptionPassword; @property (weak) id delegate; -+ (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)host; ++ (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)host withPassword:(NSString *)decryptionPassword; - (void)start; @end diff --git a/Sparkle/SUUnarchiver.m b/Sparkle/SUUnarchiver.m index fefa840b..e887f4ca 100644 --- a/Sparkle/SUUnarchiver.m +++ b/Sparkle/SUUnarchiver.m @@ -20,13 +20,13 @@ @synthesize archivePath; @synthesize updateHostBundlePath; @synthesize delegate; +@synthesize decryptionPassword; -+ (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)hostPath ++ (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)hostPath withPassword:(NSString *)decryptionPassword { - for (id current in [self unarchiverImplementations]) - { + for (id current in [self unarchiverImplementations]) { if ([current canUnarchivePath:path]) { - return [[current alloc] initWithPath:path hostBundlePath:hostPath]; + return [[current alloc] initWithPath:path hostBundlePath:hostPath password:decryptionPassword]; } } return nil; @@ -39,12 +39,13 @@ // No-op } -- (instancetype)initWithPath:(NSString *)path hostBundlePath:(NSString *)hostPath +- (instancetype)initWithPath:(NSString *)path hostBundlePath:(NSString *)hostPath password:(NSString *)password { if ((self = [super init])) { archivePath = [path copy]; updateHostBundlePath = hostPath; + decryptionPassword = password; } return self; } diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 6b5230bc..d91bfbed 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -142,21 +142,14 @@ // If there's a release notes URL, load it; otherwise, just stick the contents of the description into the web view. if ([self.updateItem releaseNotesURL]) { - if ([[self.updateItem releaseNotesURL] isFileURL]) - { - [[self.releaseNotesView mainFrame] loadHTMLString:@"Release notes with file:// URLs are not supported for security reasons—Javascript would be able to read files on your file system." baseURL:nil]; - } - else - { - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:self.updateItem.releaseNotesURL - cachePolicy:NSURLRequestReloadIgnoringCacheData - timeoutInterval:30]; - if (self.releaseNotesRequestModifier != nil) - { - self.releaseNotesRequestModifier(request); - } - [[self.releaseNotesView mainFrame] loadRequest:request]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:self.updateItem.releaseNotesURL + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:30]; + if (self.releaseNotesRequestModifier != nil) + { + self.releaseNotesRequestModifier(request); } + [[self.releaseNotesView mainFrame] loadRequest:request]; } else { @@ -271,8 +264,17 @@ - (void)webView:(WebView *)__unused sender decidePolicyForNavigationAction:(NSDictionary *)__unused actionInformation request:(NSURLRequest *)request frame:(WebFrame *)__unused frame decisionListener:(id)listener { + NSURL *requestURL = request.URL; + NSString *scheme = requestURL.scheme; + BOOL whitelistedSafe = [@"http" isEqualToString:scheme] || [@"https" isEqualToString:scheme] || [@"about:blank" isEqualToString:requestURL.absoluteString]; + + // Do not allow redirects to dangerous protocols such as file:// + if (!whitelistedSafe) { + [listener ignore]; + return; + } + if (self.webViewFinishedLoading) { - NSURL *requestURL = request.URL; if (requestURL) { [[NSWorkspace sharedWorkspace] openURL:requestURL]; } diff --git a/Sparkle/SUUpdateDriver.h b/Sparkle/SUUpdateDriver.h index acfb62d6..323ded38 100644 --- a/Sparkle/SUUpdateDriver.h +++ b/Sparkle/SUUpdateDriver.h @@ -22,6 +22,9 @@ extern NSString *const SUUpdateDriverFinishedNotification; - (instancetype)initWithUpdater:(SUUpdater *)updater; - (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)host; - (void)abortUpdate:(SUUpdateAbortReason)reason; + +- (void)showAlert:(NSAlert *)alert; + @property (getter=isInterruptible, readonly) BOOL interruptible; @property (readonly) BOOL finished; @property BOOL automaticallyInstallUpdates; diff --git a/Sparkle/SUUpdateDriver.m b/Sparkle/SUUpdateDriver.m index 55c7d607..7867eb0e 100644 --- a/Sparkle/SUUpdateDriver.m +++ b/Sparkle/SUUpdateDriver.m @@ -8,6 +8,7 @@ #import "SUUpdateDriver.h" #import "SUHost.h" +#import "SULog.h" NSString *const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished"; @@ -58,4 +59,9 @@ NSString *const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished"; return NO; } +- (void)showAlert:(NSAlert *)alert { + // Only UI-based subclass shows the actual alert + SULog(@"ALERT: %@\n%@", alert.messageText, alert.informativeText); +} + @end diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index fb4da04f..c576a23f 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -54,6 +54,8 @@ SU_EXPORT @interface SUUpdater : NSObject @property BOOL automaticallyDownloadsUpdates; +@property (nonatomic, copy) NSString *decryptionPassword; + /*! Explicitly checks for updates and displays a progress dialog while doing so. diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index 39dd1ae1..cc5d6ad8 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -41,9 +41,6 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification - (void)updateDriverDidFinish:(NSNotification *)note; @property (readonly, copy) NSURL *parameterizedFeedURL; -- (void)notifyWillShowModalAlert; -- (void)notifyDidShowModalAlert; - @property (strong) SUUpdateDriver *driver; @property (strong) SUHost *host; @@ -58,6 +55,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification @synthesize driver; @synthesize host; @synthesize sparkleBundle; +@synthesize decryptionPassword; static NSMutableDictionary *sharedUpdaters = nil; static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObservationContext"; @@ -109,42 +107,44 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults sharedUpdaters[[NSValue valueWithNonretainedObject:bundle]] = self; host = [[SUHost alloc] initWithBundle:bundle]; - // Saving-the-developer-from-a-stupid-mistake-check: - BOOL hasPublicDSAKey = [host publicDSAKey] != nil; - BOOL isMainBundle = [bundle isEqualTo:[NSBundle mainBundle]]; - BOOL hostIsCodeSigned = [SUCodeSigningVerifier applicationAtPathIsCodeSigned:host.bundlePath]; - BOOL servingOverHttps = [[[[self feedURL] scheme] lowercaseString] isEqualToString:@"https"]; - NSAlert *alert = nil; - if (!isMainBundle && !hasPublicDSAKey) { - alert = [[NSAlert alloc] init]; - alert.messageText = @"Insecure update error!"; - alert.informativeText = @"For security reasons, you need to sign your updates with a DSA key. See Sparkle's documentation for more information."; - } else if (isMainBundle && !(hasPublicDSAKey || hostIsCodeSigned)) { - alert = [[NSAlert alloc] init]; - alert.messageText = @"Insecure update error!"; - alert.informativeText = @"For security reasons, you need to code sign your application or sign your updates with a DSA key. See Sparkle's documentation for more information."; - } else if (isMainBundle && !hasPublicDSAKey && !servingOverHttps) { - SULog(@"WARNING: Serving updates over http without signing them with a DSA key is deprecated and may not be possible in a future release. Please serve your updates over https, or sign them with a DSA key, or do both. See Sparkle's documentation for more information."); - } - - BOOL shouldShowAlert = alert != nil; - if (shouldShowAlert && [self.delegate respondsToSelector:@selector(updater:mayShowModalAlert:)]) - { - shouldShowAlert = [self.delegate updater:self mayShowModalAlert:alert]; - } - if (shouldShowAlert) - { - [self notifyWillShowModalAlert]; - [alert runModal]; - [self notifyDidShowModalAlert]; - } - // This runs the permission prompt if needed, but never before the app has finished launching because the runloop won't run before that [self performSelector:@selector(startUpdateCycle) withObject:nil afterDelay:0]; } return self; } +-(void)showAlertText:(NSString *)text informativeText:(NSString *)informativeText { + NSAlert *alert = [[NSAlert alloc] init]; + alert.messageText = text; + alert.informativeText = informativeText; + [self.driver showAlert:alert]; +} + +-(void)checkIfConfiguredProperly { + BOOL hasPublicDSAKey = [self.host publicDSAKey] != nil; + BOOL isMainBundle = [self.host.bundle isEqualTo:[NSBundle mainBundle]]; + BOOL hostIsCodeSigned = [SUCodeSigningVerifier applicationAtPathIsCodeSigned:self.host.bundlePath]; + NSURL *feedURL = [self feedURL]; + BOOL servingOverHttps = [[[feedURL scheme] lowercaseString] isEqualToString:@"https"]; + if (!hasPublicDSAKey && !hostIsCodeSigned) { + [self showAlertText:@"Insecure update error!" + informativeText:@"For security reasons, you need to code sign your application or sign your updates with a DSA key. See Sparkle's documentation for more information."]; + } else if (isMainBundle && !hasPublicDSAKey && !servingOverHttps) { + SULog(@"WARNING: Serving updates over HTTP without signing them with a DSA key is deprecated and may not be possible in a future release. Please serve your updates over https, or sign them with a DSA key, or do both. See Sparkle's documentation for more information."); + } + +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 + BOOL atsExceptionsExist = nil != [self.host objectForInfoDictionaryKey:@"NSAppTransportSecurity"]; + if (isMainBundle && !servingOverHttps && !atsExceptionsExist) { + [self showAlertText:@"Insecure feed URL is blocked in OS X 10.11" + informativeText:[NSString stringWithFormat:@"You must change the feed URL (%@) to use HTTPS or disable App Transport Security.\n\nFor more information:\nhttp://sparkle-project.org/documentation/app-transport-security/", [feedURL absoluteString]]]; + } + if (!isMainBundle && !servingOverHttps) { + SULog(@"WARNING: Serving updates over HTTP may be blocked in OS X 10.11. Please change the feed URL (%@) to use HTTPS. For more information:\nhttp://sparkle-project.org/documentation/app-transport-security/", feedURL); + } +#endif +} + // This will be used when the updater is instantiated in a nib such as MainMenu - (instancetype)init @@ -154,21 +154,6 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults - (NSString *)description { return [NSString stringWithFormat:@"%@ <%@, %@>", [self class], [self.host bundlePath], [self.host installationPath]]; } - -- (void)notifyWillShowModalAlert -{ - if ([self.delegate respondsToSelector:@selector(updaterWillShowModalAlert:)]) - [self.delegate updaterWillShowModalAlert:self]; -} - - -- (void)notifyDidShowModalAlert -{ - if ([self.delegate respondsToSelector:@selector(updaterDidShowModalAlert:)]) - [self.delegate updaterDidShowModalAlert:self]; -} - - - (void)startUpdateCycle { BOOL shouldPrompt = NO; @@ -387,6 +372,8 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults return; } + [self checkIfConfiguredProperly]; + NSURL *theFeedURL = [self parameterizedFeedURL]; if (theFeedURL) // Use a NIL URL to cancel quietly. [self.driver checkForUpdatesAtURL:theFeedURL host:self.host]; diff --git a/Sparkle/ja.lproj/Sparkle.strings b/Sparkle/ja.lproj/Sparkle.strings index 4241828b..f0a558cf 100644 --- a/Sparkle/ja.lproj/Sparkle.strings +++ b/Sparkle/ja.lproj/Sparkle.strings @@ -10,7 +10,7 @@ "%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ が入手できます(使用中のバージョンは %3$@ です)。今すぐダウンロードしますか?"; /* Description text for SUUpdateAlert when the update informational with no download. */ -"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ is now available--you have %3$@. Would you like to learn more about this update on the web?"; +"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ が入手できます(使用中のバージョンは %3$@ です)。このアップデートの詳しい情報を Web で確認しますか?"; "%@ downloaded" = "%@ ダウンロード済み"; @@ -35,7 +35,7 @@ "An important update to %@ is ready to install" = "%@ の重要なアップデートがインストールできます。"; /* the unit for bytes */ -"B" = "B"; +"B" = "バイト"; "Cancel" = "キャンセル"; diff --git a/Sparkle/pt_BR.lproj/Sparkle.strings b/Sparkle/pt_BR.lproj/Sparkle.strings index 73e8bb04..0a18525d 100755 --- a/Sparkle/pt_BR.lproj/Sparkle.strings +++ b/Sparkle/pt_BR.lproj/Sparkle.strings @@ -8,7 +8,7 @@ "%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ está disponível – sua versão é %3$@. Deseja transferi-lo agora?"; /* Description text for SUUpdateAlert when the update informational with no download. */ -"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ is now available--you have %3$@. Would you like to learn more about this update on the web?"; +"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ está disponível – sua versão é %3$@. Deseja saber mais sobre esta atualização na web?"; "%@ downloaded" = "%@ transferidos"; @@ -18,17 +18,17 @@ "A new version of %@ is ready to install!" = "Uma nova versão do %@ está pronta para ser instalada!"; -"An error occurred in retrieving update information. Please try again later." = "Ocorreu um erro ao obter informações da atualização. Tente novamente mais tarde."; +"An error occurred in retrieving update information. Please try again later." = "Ocorreu um erro ao obter informações da atualização. Tente novamente mais tarde."; "An error occurred while downloading the update. Please try again later." = "Ocorreu um erro ao transferir a atualização. Tente novamente mais tarde."; -"An error occurred while extracting the archive. Please try again later." = "Ocorreu um erro ao extrair o arquivo. Tente novamente mais tarde."; +"An error occurred while extracting the archive. Please try again later." = "Ocorreu um erro ao extrair o arquivo comprimido. Tente novamente mais tarde."; "An error occurred while installing the update. Please try again later." = "Ocorreu um erro ao instalar a atualização. Tente novamente mais tarde."; "An error occurred while parsing the update feed." = "Ocorreu um erro ao analisar o feed de atualização."; -"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Ocorreu um erro ao reiniciar o %1$@. A nova versão estará disponível da próxima vez que você abrir o %1$@."; +"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Ocorreu um erro ao reabrir o %1$@. A nova versão estará disponível da próxima vez que você abrir o %1$@."; /* the unit for bytes */ "B" = "B"; @@ -48,7 +48,7 @@ /* the unit for gigabytes */ "GB" = "GB"; -"Install and Relaunch" = "Instalar e Reiniciar"; +"Install and Relaunch" = "Instalar e Reabrir"; /* Take care not to overflow the status window. */ "Installing update..." = "Instalando atualização…"; diff --git a/Tests/Resources/SparkleTestCodeSignApp.enc.dmg b/Tests/Resources/SparkleTestCodeSignApp.enc.dmg new file mode 100644 index 00000000..c30b4e6a Binary files /dev/null and b/Tests/Resources/SparkleTestCodeSignApp.enc.dmg differ diff --git a/Tests/SUUnarchiverTest.swift b/Tests/SUUnarchiverTest.swift index 66f758bf..b81ffc38 100644 --- a/Tests/SUUnarchiverTest.swift +++ b/Tests/SUUnarchiverTest.swift @@ -10,6 +10,7 @@ import XCTest class SUUnarchiverTest: XCTestCase, SUUnarchiverDelegate { + var password: String? = nil var unarchivedExpectation: XCTestExpectation? = nil var unarchivedResult: Bool = false @@ -48,7 +49,7 @@ class SUUnarchiverTest: XCTestCase, SUUnarchiverDelegate self.unarchivedExpectation = super.expectationWithDescription("Unarchived Application (format: \(archiveExtension))") - let unarchiver = SUUnarchiver(forPath: tempArchiveURL.path!, updatingHostBundlePath: nil) + let unarchiver = SUUnarchiver(forPath: tempArchiveURL.path!, updatingHostBundlePath: nil, withPassword: self.password) unarchiver.delegate = self unarchiver.start() @@ -90,4 +91,10 @@ class SUUnarchiverTest: XCTestCase, SUUnarchiverDelegate { self.unarchiveTestAppWithExtension("dmg") } + + func testUnarchivingEncryptedDmg() + { + self.password = "testpass"; + self.unarchiveTestAppWithExtension("enc.dmg") + } } diff --git a/Tests/SUUpdaterTest.m b/Tests/SUUpdaterTest.m index 81eb5bf8..0e7d6e76 100644 --- a/Tests/SUUpdaterTest.m +++ b/Tests/SUUpdaterTest.m @@ -37,7 +37,7 @@ - (NSString *)feedURLStringForUpdater:(SUUpdater *) __unused updater { - return @""; + return @"https://test.example.com"; } - (void)testFeedURL diff --git a/bin/generate_keys b/bin/generate_keys index 4df8464c..d5b49db3 100755 --- a/bin/generate_keys +++ b/bin/generate_keys @@ -13,8 +13,12 @@ chmod 0400 dsa_priv.pem $openssl dsa -in dsa_priv.pem -pubout -out dsa_pub.pem echo " -Generated private and public keys: dsa_priv.pem and dsa_pub.pem. +Generated two files: +dsa_priv.pem: your private key. Keep it secret and don't share it! +dsa_pub.pem: public counterpart to include in the app bundle. + BACK UP YOUR PRIVATE KEY AND KEEP IT SAFE! -If you lose it, your users will be unable to upgrade!" +If you lose it, your users will be unable to upgrade! +" open -R dsa_priv.pem