mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ff1488f0c | ||
|
|
c0c1c51d8d | ||
|
|
5139179487 | ||
|
|
f50cbce0e8 | ||
|
|
14f1d3520a | ||
|
|
9c4729ed4a | ||
|
|
f04a61e159 | ||
|
|
80d8758fc2 | ||
|
|
081301d590 | ||
|
|
397370297b | ||
|
|
b30dcd979f | ||
|
|
ee123edd74 | ||
|
|
984625cc7e | ||
|
|
7b6e7957c6 | ||
|
|
2815514c23 | ||
|
|
49eaa4c5cc | ||
|
|
09bcee7280 | ||
|
|
49ea08b284 | ||
|
|
f9dc70ade2 | ||
|
|
6fb3eee91b | ||
|
|
19be83b15f | ||
|
|
d90529ccaa | ||
|
|
623b7b6bda | ||
|
|
65bcb3815e | ||
|
|
d5cd95e0ef | ||
|
|
b9150d2938 | ||
|
|
1006326157 | ||
|
|
68856e074b | ||
|
|
a86bdb2fa8 | ||
|
|
92e00baafb | ||
|
|
98ea3e3d57 | ||
|
|
c094a38231 | ||
|
|
6df898f9b7 | ||
|
|
7f51a4e344 | ||
|
|
8ad1f57672 | ||
|
|
8b88183c7d | ||
|
|
d036d3e3ae | ||
|
|
8b13eb5dcf | ||
|
|
ba5b7341fa |
No files matched your search
@@ -0,0 +1,3 @@
|
||||
[submodule "ed25519"]
|
||||
path = ed25519
|
||||
url = https://github.com/orlp/ed25519
|
||||
@@ -1,3 +1,20 @@
|
||||
|
||||
# 1.21.0a2
|
||||
|
||||
* Added support EdDSA (ed25519) signatures (Kornel)
|
||||
* DSA signatures are considered outdated, and Apple's `Security.framework` only supports weaker SHA-1-based DSA.
|
||||
* Both old DSA and new EdDSA are still supported (and one app can use both), but new applications should use EdDSA only, and we recommend migrating away from DSA signatures.
|
||||
* `generate_keys` is now a Swift tool that stores EdDSA private keys in the Keychain
|
||||
* Existing apps can continue using their old DSA keys, but we've dropped support for generation of old DSA keys
|
||||
* `sign_update` is now a Swift tool that signs using EdDSA from private keys in the Keychain
|
||||
* The old DSA-based signing script has been moved to `bin/old_dsa_scripts`
|
||||
* The old DSA-based signing script has been fixed to work on pre-10.13 systems (Thomas Tempelmann)
|
||||
* `generate_appcast` has been updated to support EdDSA signatures
|
||||
* It can sign both DSA (if `dsa_priv.pem` file is specified) and EdDSA (from Keychain)
|
||||
* The tool now uses Caches directory and doesn't generate unnecessary delta files
|
||||
* Fixed verification of delta updates on filesystems that change permissions of symlinks
|
||||
* SPUDownloaderSession leaked because the NSURLSession wasn’t invalidated (Michael Ehrmann)
|
||||
|
||||
# 1.20.0
|
||||
|
||||
* `generate_appcast` option to read private key directly from the keychain (Tamás Lustyik)
|
||||
|
||||
@@ -16,7 +16,7 @@ SPARKLE_AUTOMATED_DOWNGRADES = 0
|
||||
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0
|
||||
|
||||
SPARKLE_VERSION_MAJOR = 1
|
||||
SPARKLE_VERSION_MINOR = 20
|
||||
SPARKLE_VERSION_MINOR = 21
|
||||
SPARKLE_VERSION_PATCH = 0
|
||||
SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// Generate Appcast only
|
||||
|
||||
#include "ConfigSwift.xcconfig"
|
||||
|
||||
SWIFT_OBJC_BRIDGING_HEADER = generate_keys/Bridging-Header.h
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11
|
||||
PRODUCT_NAME = generate_keys
|
||||
@@ -0,0 +1,4 @@
|
||||
// Generate Appcast Debug
|
||||
|
||||
#include "ConfigGenerateKeys.xcconfig"
|
||||
#include "ConfigSwiftDebug.xcconfig"
|
||||
@@ -0,0 +1,4 @@
|
||||
// Generate Appcast Release
|
||||
|
||||
#include "ConfigGenerateKeys.xcconfig"
|
||||
#include "ConfigSwiftRelease.xcconfig"
|
||||
@@ -19,6 +19,8 @@ if [ "$ACTION" = "" ] ; then
|
||||
cp -R "$SRCROOT/bin" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp "$CONFIGURATION_BUILD_DIR/BinaryDelta" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp "$CONFIGURATION_BUILD_DIR/generate_appcast" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp "$CONFIGURATION_BUILD_DIR/generate_keys" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp "$CONFIGURATION_BUILD_DIR/sign_update" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
|
||||
@@ -27,6 +29,8 @@ if [ "$ACTION" = "" ] ; then
|
||||
if [ "$CONFIGURATION" = "Release" ] ; then
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/BinaryDelta.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/generate_appcast.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/generate_keys.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/sign_update.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
fi
|
||||
|
||||
+4
-3
@@ -18,8 +18,8 @@ Secure and reliable software update framework for Cocoa developers.
|
||||
|
||||
## Changes since 1.5b
|
||||
|
||||
* Compatibilty with macOS Sierra.
|
||||
* Up-to-date with 10.12 SDK and Xcode 8 (supports macOS 10.7+).
|
||||
* Compatibilty with macOS Sierra (and all newer versions).
|
||||
* Up-to-date with 10.13 SDK and Xcode 9 (supports macOS 10.7+).
|
||||
* Important security fixes.
|
||||
* Cleaned up and modernized code, using ARC and Autolayout.
|
||||
* Truly automatic background updates (no UI at all) when user agreed to "Automatically download and install updates in the future."
|
||||
@@ -30,8 +30,9 @@ Secure and reliable software update framework for Cocoa developers.
|
||||
## Requirements
|
||||
|
||||
* Runtime: macOS 10.7 or greater
|
||||
* Build: Xcode 7 and 10.11 SDK or greater
|
||||
* Build: Xcode 8 and 10.11 SDK or greater
|
||||
* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
|
||||
* No sandboxing. Sparkle 1.x can't update sandboxed apps. Sparkle 2.0 (alpha) can.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
http://you.com/app/2.0.html
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate>
|
||||
<!-- Sparkle 1.21+ uses sparkle::edSignature="ed25519" instead of sparkle::dsaSignature="deprecated DSA" -->
|
||||
<enclosure url="http://you.com/app/Your%20Great%20App%202.0.zip" sparkle:version="2.0" length="1623481" type="application/octet-stream" sparkle:dsaSignature="BAFJW4B6B1K1JyW30nbkBwainOzrN6EQuAh" />
|
||||
<sparkle:minimumSystemVersion>10.7</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
@@ -20,6 +21,7 @@
|
||||
http://you.com/app/1.5.html
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Wed, 01 Jan 2006 12:20:11 +0000</pubDate>
|
||||
<!-- Sparkle 1.21+ uses sparkle::edSignature="ed25519" instead of sparkle::dsaSignature="deprecated DSA" -->
|
||||
<enclosure url="http://you.com/app/Your%20Great%20App%201.5.zip" sparkle:version="1.5" length="1472893" type="application/octet-stream" sparkle:dsaSignature="234818feCa1JyW30nbkBwainOzrN6EQuAh" />
|
||||
<sparkle:minimumSystemVersion>10.7</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
@@ -31,6 +33,7 @@
|
||||
http://you.com/app/1.4.html
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Wed, 25 Dec 2005 12:20:11 +0000</pubDate>
|
||||
<!-- Sparkle 1.21+ uses sparkle::edSignature="ed25519" instead of sparkle::dsaSignature="deprecated DSA" -->
|
||||
<enclosure url="http://you.com/app/Your%20Great%20App%201.4.zip" sparkle:version="241" sparkle:shortVersionString="1.4" sparkle:dsaSignature="MC0CFBfeCa1JyW30nbkBwainOzrN6EQuAh=" length="1472349" type="application/octet-stream" />
|
||||
<sparkle:minimumSystemVersion>10.7</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
5A5ADEF0214EE67100DF0099 /* PBXTargetDependency */,
|
||||
5A5ADEEE214EE66E00DF0099 /* PBXTargetDependency */,
|
||||
5AE13FAA1E0D7E2F000D2C2C /* PBXTargetDependency */,
|
||||
14950064195FB8A600BC5B5B /* PBXTargetDependency */,
|
||||
14950066195FB8A600BC5B5B /* PBXTargetDependency */,
|
||||
@@ -37,7 +39,6 @@
|
||||
14652F8019A9740F00959E44 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; };
|
||||
14652F8219A9746000959E44 /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
|
||||
14652F8419A978C200959E44 /* SUExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 14652F8319A9759F00959E44 /* SUExport.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
14732BC01960F2C200593899 /* test_app_only_dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 14732BBF1960F0AC00593899 /* test_app_only_dsa_pub.pem */; };
|
||||
14732BD019610A0D00593899 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; };
|
||||
14732BD119610A1200593899 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; };
|
||||
14732BD319610A1800593899 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14732BD219610A1800593899 /* XCTest.framework */; };
|
||||
@@ -89,6 +90,17 @@
|
||||
5A4094481C74EA5200983BE0 /* SUAppcastTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AA4DCD01C73E5510078F128 /* SUAppcastTest.swift */; };
|
||||
5A5AC5361E0C6CA300998119 /* Unarchive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5AC5351E0C6CA300998119 /* Unarchive.swift */; };
|
||||
5A5AC5381E0C6D3000998119 /* FeedXML.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5AC5371E0C6D3000998119 /* FeedXML.swift */; };
|
||||
5A5ADEDA214EDE4900DF0099 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5ADED9214EDE4900DF0099 /* main.swift */; };
|
||||
5A5ADEDF214EDF6300DF0099 /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; };
|
||||
5A5ADEE0214EDF6300DF0099 /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; };
|
||||
5A5ADEE1214EDF6300DF0099 /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; };
|
||||
5A5ADEE2214EDF6300DF0099 /* key_exchange.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F178214D564B00A1187F /* key_exchange.c */; };
|
||||
5A5ADEE3214EDF6300DF0099 /* keypair.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17F214D564C00A1187F /* keypair.c */; };
|
||||
5A5ADEE4214EDF6300DF0099 /* sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F16F214D564A00A1187F /* sc.c */; };
|
||||
5A5ADEE5214EDF6300DF0099 /* seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17B214D564B00A1187F /* seed.c */; };
|
||||
5A5ADEE6214EDF6300DF0099 /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F172214D564B00A1187F /* sha512.c */; };
|
||||
5A5ADEE7214EDF6300DF0099 /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17D214D564B00A1187F /* sign.c */; };
|
||||
5A5ADEE8214EDF6300DF0099 /* verify.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F177214D564B00A1187F /* verify.c */; };
|
||||
5A6D31EE1BF53245009C5157 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
||||
5A6D31EF1BF5325F009C5157 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
|
||||
5AA96C581E0AE0DB00CA4346 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AA96C571E0AE0DB00CA4346 /* main.swift */; };
|
||||
@@ -99,8 +111,47 @@
|
||||
5AAD00691E0C2DAB00AF411E /* bsdiff.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */; };
|
||||
5AAD006A1E0C2DB500AF411E /* sais.c in Sources */ = {isa = PBXBuildFile; fileRef = 7223E7611AD1AEFF008E3161 /* sais.c */; };
|
||||
5AAD006C1E0C2DBF00AF411E /* libxar.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AAD006B1E0C2DBF00AF411E /* libxar.tbd */; };
|
||||
5AB8F169214D4AE300A1187F /* SUSignatures.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF04876214D2E5F00B5789F /* SUSignatures.m */; };
|
||||
5AB8F180214D564C00A1187F /* sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F16F214D564A00A1187F /* sc.c */; };
|
||||
5AB8F181214D564C00A1187F /* sha512.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F170214D564A00A1187F /* sha512.h */; };
|
||||
5AB8F182214D564C00A1187F /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; };
|
||||
5AB8F183214D564C00A1187F /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F172214D564B00A1187F /* sha512.c */; };
|
||||
5AB8F184214D564C00A1187F /* fe.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F173214D564B00A1187F /* fe.h */; };
|
||||
5AB8F185214D564C00A1187F /* ed25519.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F174214D564B00A1187F /* ed25519.h */; };
|
||||
5AB8F186214D564C00A1187F /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; };
|
||||
5AB8F187214D564C00A1187F /* precomp_data.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F176214D564B00A1187F /* precomp_data.h */; };
|
||||
5AB8F188214D564C00A1187F /* verify.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F177214D564B00A1187F /* verify.c */; };
|
||||
5AB8F189214D564C00A1187F /* key_exchange.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F178214D564B00A1187F /* key_exchange.c */; };
|
||||
5AB8F18A214D564C00A1187F /* fixedint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F179214D564B00A1187F /* fixedint.h */; };
|
||||
5AB8F18B214D564C00A1187F /* ge.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F17A214D564B00A1187F /* ge.h */; };
|
||||
5AB8F18C214D564C00A1187F /* seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17B214D564B00A1187F /* seed.c */; };
|
||||
5AB8F18D214D564C00A1187F /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; };
|
||||
5AB8F18E214D564C00A1187F /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17D214D564B00A1187F /* sign.c */; };
|
||||
5AB8F18F214D564C00A1187F /* sc.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F17E214D564B00A1187F /* sc.h */; };
|
||||
5AB8F190214D564C00A1187F /* keypair.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17F214D564C00A1187F /* keypair.c */; };
|
||||
5AB8F191214DA5FD00A1187F /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; };
|
||||
5AB8F192214DA5FD00A1187F /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; };
|
||||
5AB8F193214DA5FD00A1187F /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; };
|
||||
5AB8F194214DA5FD00A1187F /* key_exchange.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F178214D564B00A1187F /* key_exchange.c */; };
|
||||
5AB8F195214DA5FD00A1187F /* keypair.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17F214D564C00A1187F /* keypair.c */; };
|
||||
5AB8F196214DA5FD00A1187F /* sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F16F214D564A00A1187F /* sc.c */; };
|
||||
5AB8F197214DA5FD00A1187F /* seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17B214D564B00A1187F /* seed.c */; };
|
||||
5AB8F198214DA5FD00A1187F /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F172214D564B00A1187F /* sha512.c */; };
|
||||
5AB8F199214DA5FD00A1187F /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17D214D564B00A1187F /* sign.c */; };
|
||||
5AB8F19A214DA5FD00A1187F /* verify.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F177214D564B00A1187F /* verify.c */; };
|
||||
5AB8F1A2214DA72000A1187F /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F1A1214DA72000A1187F /* main.swift */; };
|
||||
5AB8F1AC214DAB9D00A1187F /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; };
|
||||
5AB8F1AD214DAB9D00A1187F /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; };
|
||||
5AB8F1AE214DAB9D00A1187F /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; };
|
||||
5AB8F1AF214DAB9D00A1187F /* key_exchange.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F178214D564B00A1187F /* key_exchange.c */; };
|
||||
5AB8F1B0214DAB9D00A1187F /* keypair.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17F214D564C00A1187F /* keypair.c */; };
|
||||
5AB8F1B1214DAB9D00A1187F /* sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F16F214D564A00A1187F /* sc.c */; };
|
||||
5AB8F1B2214DAB9D00A1187F /* seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17B214D564B00A1187F /* seed.c */; };
|
||||
5AB8F1B3214DAB9D00A1187F /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F172214D564B00A1187F /* sha512.c */; };
|
||||
5AB8F1B4214DAB9D00A1187F /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17D214D564B00A1187F /* sign.c */; };
|
||||
5AB8F1B5214DAB9D00A1187F /* verify.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F177214D564B00A1187F /* verify.c */; };
|
||||
5AD0FA7F1C73F2E2004BCEFF /* testappcast.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5AD0FA7E1C73F2E2004BCEFF /* testappcast.xml */; };
|
||||
5AE13F781E0C9B12000D2C2C /* DSASignature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AE13F771E0C9B12000D2C2C /* DSASignature.swift */; };
|
||||
5AE13F781E0C9B12000D2C2C /* Signatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AE13F771E0C9B12000D2C2C /* Signatures.swift */; };
|
||||
5AE13FA01E0D4F65000D2C2C /* Appcast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AE13F9F1E0D4F65000D2C2C /* Appcast.swift */; };
|
||||
5AE13FA11E0D7168000D2C2C /* SUUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A8C09CA790200B7442F /* SUUnarchiver.m */; };
|
||||
5AE13FA21E0D716F000D2C2C /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
||||
@@ -118,6 +169,8 @@
|
||||
5AE459001C34118500E3BB47 /* SUUpdaterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 14950074195FDF5900BC5B5B /* SUUpdaterTest.m */; };
|
||||
5AE459021C34118500E3BB47 /* SUVersionComparisonTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 61227A150DB548B800AB99EA /* SUVersionComparisonTest.m */; };
|
||||
5AE7E1111DC81AD3009C2C12 /* AppIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5AE7E10E1DC81ACA009C2C12 /* AppIcon.icns */; };
|
||||
5AF04877214D2E5F00B5789F /* SUSignatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AF04875214D2E5F00B5789F /* SUSignatures.h */; };
|
||||
5AF04878214D2E5F00B5789F /* SUSignatures.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF04876214D2E5F00B5789F /* SUSignatures.m */; };
|
||||
5AF6C74F1AEA46D10014A3AB /* test.pkg in Resources */ = {isa = PBXBuildFile; fileRef = 5AF6C74E1AEA46D10014A3AB /* test.pkg */; };
|
||||
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */; };
|
||||
5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */; };
|
||||
@@ -137,6 +190,16 @@
|
||||
5D1AF59A0FD767E50065DB48 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5990FD767E50065DB48 /* libz.dylib */; };
|
||||
5D1AF82B0FD768180065DB48 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5990FD767E50065DB48 /* libz.dylib */; };
|
||||
5F1510A21C96E591006E1629 /* testnamespaces.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5F1510A11C96E591006E1629 /* testnamespaces.xml */; };
|
||||
5FD37C9D216B3E5A0003A1B6 /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; };
|
||||
5FD37C9E216B3E5A0003A1B6 /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; };
|
||||
5FD37C9F216B3E5A0003A1B6 /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; };
|
||||
5FD37CA0216B3E5A0003A1B6 /* key_exchange.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F178214D564B00A1187F /* key_exchange.c */; };
|
||||
5FD37CA1216B3E5A0003A1B6 /* keypair.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17F214D564C00A1187F /* keypair.c */; };
|
||||
5FD37CA2216B3E5A0003A1B6 /* sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F16F214D564A00A1187F /* sc.c */; };
|
||||
5FD37CA3216B3E5A0003A1B6 /* seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17B214D564B00A1187F /* seed.c */; };
|
||||
5FD37CA4216B3E5A0003A1B6 /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F172214D564B00A1187F /* sha512.c */; };
|
||||
5FD37CA5216B3E5A0003A1B6 /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17D214D564B00A1187F /* sign.c */; };
|
||||
5FD37CA6216B3E5A0003A1B6 /* verify.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F177214D564B00A1187F /* verify.c */; };
|
||||
610134730DD250470049ACDF /* SUUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 610134710DD250470049ACDF /* SUUpdateDriver.h */; settings = {ATTRIBUTES = (); }; };
|
||||
610134740DD250470049ACDF /* SUUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 610134720DD250470049ACDF /* SUUpdateDriver.m */; };
|
||||
6101347B0DD2541A0049ACDF /* SUProbingUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 610134790DD2541A0049ACDF /* SUProbingUpdateDriver.h */; settings = {ATTRIBUTES = (); }; };
|
||||
@@ -148,8 +211,8 @@
|
||||
61177A1F0D1112E900749C97 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6117796E0D1112E000749C97 /* IOKit.framework */; };
|
||||
6120721209CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.h in Headers */ = {isa = PBXBuildFile; fileRef = 6120721009CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.h */; settings = {ATTRIBUTES = (); }; };
|
||||
6120721309CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = 6120721109CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.m */; };
|
||||
61299A2F09CA2DAB00B7442F /* SUDSAVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 61299A2D09CA2DAB00B7442F /* SUDSAVerifier.h */; settings = {ATTRIBUTES = (); }; };
|
||||
61299A3009CA2DAB00B7442F /* SUDSAVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A2E09CA2DAB00B7442F /* SUDSAVerifier.m */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
|
||||
61299A2F09CA2DAB00B7442F /* SUSignatureVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 61299A2D09CA2DAB00B7442F /* SUSignatureVerifier.h */; settings = {ATTRIBUTES = (); }; };
|
||||
61299A3009CA2DAB00B7442F /* SUSignatureVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A2E09CA2DAB00B7442F /* SUSignatureVerifier.m */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
|
||||
61299A5C09CA6D4500B7442F /* SUConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 61299A5B09CA6D4500B7442F /* SUConstants.h */; settings = {ATTRIBUTES = (); }; };
|
||||
61299A6009CA6EB100B7442F /* SUConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A5F09CA6EB100B7442F /* SUConstants.m */; };
|
||||
61299A8D09CA790200B7442F /* SUUnarchiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 61299A8B09CA790200B7442F /* SUUnarchiver.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
@@ -271,8 +334,6 @@
|
||||
72E45CF71B640DAE005C701A /* SUUpdateSettingsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.m */; };
|
||||
72E45CF81B640DAE005C701A /* SUUpdateSettingsWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CF61B640DAE005C701A /* SUUpdateSettingsWindowController.xib */; };
|
||||
72E45CFC1B641961005C701A /* sparkletestcast.xml in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CFB1B641961005C701A /* sparkletestcast.xml */; };
|
||||
72E45CFE1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */; };
|
||||
72E45DDD1B65C3BD005C701A /* sign_update in Resources */ = {isa = PBXBuildFile; fileRef = 72E45DDC1B65C3BD005C701A /* sign_update */; };
|
||||
72E641801D08D754000404CA /* fileop in Resources */ = {isa = PBXBuildFile; fileRef = 722954B41D04ADAF00ECF9CA /* fileop */; };
|
||||
767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 767B61AA1972D488004E0C3C /* SUGuidedPackageInstaller.h */; };
|
||||
767B61AD1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; };
|
||||
@@ -358,6 +419,34 @@
|
||||
remoteGlobalIDString = 55C14BB6136EEF1500649790;
|
||||
remoteInfo = Autoupdate;
|
||||
};
|
||||
5A5ADEE9214EE65A00DF0099 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5AB8F19E214DA72000A1187F;
|
||||
remoteInfo = generate_keys;
|
||||
};
|
||||
5A5ADEEB214EE65C00DF0099 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5A5ADED6214EDE4900DF0099;
|
||||
remoteInfo = sign_update;
|
||||
};
|
||||
5A5ADEED214EE66E00DF0099 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5AB8F19E214DA72000A1187F;
|
||||
remoteInfo = generate_keys;
|
||||
};
|
||||
5A5ADEEF214EE67100DF0099 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5A5ADED6214EDE4900DF0099;
|
||||
remoteInfo = sign_update;
|
||||
};
|
||||
5AE13FA71E0D7E1C000D2C2C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
@@ -442,15 +531,6 @@
|
||||
name = "Copy Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
722954B21D04ADAF00ECF9CA /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
722954C01D04D9D600ECF9CA /* Copy fileop */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -491,10 +571,7 @@
|
||||
14732BB91960EEEE00593899 /* SampleAppcast.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = SampleAppcast.xml; sourceTree = "<group>"; };
|
||||
14732BBA1960EF7100593899 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = SOURCE_ROOT; };
|
||||
14732BBC1960EFB500593899 /* README.markdown */ = {isa = PBXFileReference; lastKnownFileType = text; path = README.markdown; sourceTree = SOURCE_ROOT; };
|
||||
14732BBF1960F0AC00593899 /* test_app_only_dsa_pub.pem */ = {isa = PBXFileReference; lastKnownFileType = text; path = test_app_only_dsa_pub.pem; sourceTree = "<group>"; };
|
||||
14732BC11960F3B200593899 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = SOURCE_ROOT; usesTabs = 1; };
|
||||
14732BC31960F3FF00593899 /* generate_keys */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = generate_keys; sourceTree = "<group>"; };
|
||||
14732BC41960F3FF00593899 /* sign_update */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = sign_update; sourceTree = "<group>"; };
|
||||
14732BC91960F70A00593899 /* make-release-package.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "make-release-package.sh"; sourceTree = "<group>"; };
|
||||
14732BD219610A1800593899 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
147D6D9E1B66DC3C006607AB /* CheckLocalizations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CheckLocalizations.swift; path = Sparkle/CheckLocalizations.swift; sourceTree = SOURCE_ROOT; };
|
||||
@@ -632,18 +709,45 @@
|
||||
55E6F33219EC9F6C00005E76 /* SUErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUErrors.h; sourceTree = "<group>"; };
|
||||
5A5AC5351E0C6CA300998119 /* Unarchive.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Unarchive.swift; sourceTree = "<group>"; };
|
||||
5A5AC5371E0C6D3000998119 /* FeedXML.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedXML.swift; sourceTree = "<group>"; };
|
||||
5A5ADED7214EDE4900DF0099 /* sign_update */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = sign_update; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5A5ADED9214EDE4900DF0099 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
|
||||
5AA4DCD01C73E5510078F128 /* SUAppcastTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUAppcastTest.swift; sourceTree = "<group>"; };
|
||||
5AA96C571E0AE0DB00CA4346 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
|
||||
5AA96C5D1E0AE0F900CA4346 /* Appcast-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Appcast-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
5AAD00511E0BE6BE00AF411E /* ArchiveItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArchiveItem.swift; sourceTree = "<group>"; };
|
||||
5AAD006B1E0C2DBF00AF411E /* libxar.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxar.tbd; path = usr/lib/libxar.tbd; sourceTree = SDKROOT; };
|
||||
5AB8F16F214D564A00A1187F /* sc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sc.c; path = ed25519/src/sc.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F170214D564A00A1187F /* sha512.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sha512.h; path = ed25519/src/sha512.h; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F171214D564A00A1187F /* add_scalar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = add_scalar.c; path = ed25519/src/add_scalar.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F172214D564B00A1187F /* sha512.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sha512.c; path = ed25519/src/sha512.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F173214D564B00A1187F /* fe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fe.h; path = ed25519/src/fe.h; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F174214D564B00A1187F /* ed25519.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ed25519.h; path = ed25519/src/ed25519.h; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F175214D564B00A1187F /* ge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ge.c; path = ed25519/src/ge.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F176214D564B00A1187F /* precomp_data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = precomp_data.h; path = ed25519/src/precomp_data.h; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F177214D564B00A1187F /* verify.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = verify.c; path = ed25519/src/verify.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F178214D564B00A1187F /* key_exchange.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = key_exchange.c; path = ed25519/src/key_exchange.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F179214D564B00A1187F /* fixedint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fixedint.h; path = ed25519/src/fixedint.h; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F17A214D564B00A1187F /* ge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ge.h; path = ed25519/src/ge.h; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F17B214D564B00A1187F /* seed.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = seed.c; path = ed25519/src/seed.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F17C214D564B00A1187F /* fe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fe.c; path = ed25519/src/fe.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F17D214D564B00A1187F /* sign.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sign.c; path = ed25519/src/sign.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F17E214D564B00A1187F /* sc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sc.h; path = ed25519/src/sc.h; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F17F214D564C00A1187F /* keypair.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = keypair.c; path = ed25519/src/keypair.c; sourceTree = SOURCE_ROOT; };
|
||||
5AB8F19F214DA72000A1187F /* generate_keys */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = generate_keys; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5AB8F1A1214DA72000A1187F /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
|
||||
5AB8F1A8214DA85900A1187F /* ConfigGenerateKeys.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigGenerateKeys.xcconfig; sourceTree = "<group>"; };
|
||||
5AB8F1A9214DA85900A1187F /* ConfigGenerateKeysRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigGenerateKeysRelease.xcconfig; sourceTree = "<group>"; };
|
||||
5AB8F1AA214DA85900A1187F /* ConfigGenerateKeysDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigGenerateKeysDebug.xcconfig; sourceTree = "<group>"; };
|
||||
5AB8F1AB214DA8F200A1187F /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
5AD0FA7E1C73F2E2004BCEFF /* testappcast.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testappcast.xml; sourceTree = "<group>"; };
|
||||
5AE13F771E0C9B12000D2C2C /* DSASignature.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DSASignature.swift; sourceTree = "<group>"; };
|
||||
5AE13F771E0C9B12000D2C2C /* Signatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Signatures.swift; sourceTree = "<group>"; };
|
||||
5AE13F9F1E0D4F65000D2C2C /* Appcast.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Appcast.swift; sourceTree = "<group>"; };
|
||||
5AE13FB31E0D9E07000D2C2C /* generate_appcast */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = generate_appcast; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5AE13FBC1E0DA39B000D2C2C /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; };
|
||||
5AE7E10E1DC81ACA009C2C12 /* AppIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = AppIcon.icns; sourceTree = "<group>"; };
|
||||
5AEF45D9189D1CC90030D7DC /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
||||
5AF04875214D2E5F00B5789F /* SUSignatures.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SUSignatures.h; sourceTree = "<group>"; };
|
||||
5AF04876214D2E5F00B5789F /* SUSignatures.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SUSignatures.m; sourceTree = "<group>"; };
|
||||
5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUInstallerTest.m; sourceTree = "<group>"; };
|
||||
5AF6C74E1AEA46D10014A3AB /* test.pkg */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.pkg; sourceTree = "<group>"; };
|
||||
5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUDSAVerifierTest.m; sourceTree = "<group>"; };
|
||||
@@ -684,8 +788,8 @@
|
||||
612279D90DB5470200AB99EA /* Sparkle Unit Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Sparkle Unit Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
612279DA0DB5470200AB99EA /* SparkleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SparkleTests-Info.plist"; sourceTree = "<group>"; };
|
||||
61227A150DB548B800AB99EA /* SUVersionComparisonTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUVersionComparisonTest.m; sourceTree = "<group>"; };
|
||||
61299A2D09CA2DAB00B7442F /* SUDSAVerifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUDSAVerifier.h; sourceTree = "<group>"; };
|
||||
61299A2E09CA2DAB00B7442F /* SUDSAVerifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUDSAVerifier.m; sourceTree = "<group>"; };
|
||||
61299A2D09CA2DAB00B7442F /* SUSignatureVerifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUSignatureVerifier.h; sourceTree = "<group>"; };
|
||||
61299A2E09CA2DAB00B7442F /* SUSignatureVerifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUSignatureVerifier.m; sourceTree = "<group>"; };
|
||||
61299A5B09CA6D4500B7442F /* SUConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUConstants.h; sourceTree = "<group>"; };
|
||||
61299A5F09CA6EB100B7442F /* SUConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUConstants.m; sourceTree = "<group>"; };
|
||||
61299A8B09CA790200B7442F /* SUUnarchiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUnarchiver.h; sourceTree = "<group>"; };
|
||||
@@ -831,8 +935,6 @@
|
||||
72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdateSettingsWindowController.m; sourceTree = "<group>"; };
|
||||
72E45CF61B640DAE005C701A /* SUUpdateSettingsWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SUUpdateSettingsWindowController.xib; sourceTree = "<group>"; };
|
||||
72E45CFB1B641961005C701A /* sparkletestcast.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = sparkletestcast.xml; sourceTree = "<group>"; };
|
||||
72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test_app_only_dsa_priv_dont_ever_do_this_for_real.pem; sourceTree = "<group>"; };
|
||||
72E45DDC1B65C3BD005C701A /* sign_update */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = sign_update; path = bin/sign_update; sourceTree = SOURCE_ROOT; };
|
||||
767B61AA1972D488004E0C3C /* SUGuidedPackageInstaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUGuidedPackageInstaller.h; sourceTree = "<group>"; };
|
||||
767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUGuidedPackageInstaller.m; sourceTree = "<group>"; };
|
||||
8DC2EF5A0486A6940098B216 /* Sparkle-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Sparkle-Info.plist"; sourceTree = "<group>"; };
|
||||
@@ -875,6 +977,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5A5ADED4214EDE4900DF0099 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5AA96C521E0AE0DB00CA4346 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -884,6 +993,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5AB8F19C214DA72000A1187F /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5D06E8CE0FD68C7C005AE3F6 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -962,6 +1078,8 @@
|
||||
5D06E8D00FD68C7C005AE3F6 /* BinaryDelta */,
|
||||
722954B41D04ADAF00ECF9CA /* fileop */,
|
||||
5AE13FB31E0D9E07000D2C2C /* generate_appcast */,
|
||||
5AB8F19F214DA72000A1187F /* generate_keys */,
|
||||
5A5ADED7214EDE4900DF0099 /* sign_update */,
|
||||
55C14BB7136EEF1500649790 /* Autoupdate.app */,
|
||||
61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */,
|
||||
612279D90DB5470200AB99EA /* Sparkle Unit Tests.xctest */,
|
||||
@@ -983,6 +1101,8 @@
|
||||
1420DE391962322200203BB0 /* Documentation */,
|
||||
FA1941C40D94A6EA00DD942E /* Configurations */,
|
||||
726B2B5E1C645FC900388755 /* UI Tests */,
|
||||
5AB8F1A0214DA72000A1187F /* generate_keys */,
|
||||
5A5ADED8214EDE4900DF0099 /* sign_update */,
|
||||
0867D69AFE84028FC02AAC07 /* Frameworks */,
|
||||
034768DFFF38A50411DB9C8B /* Products */,
|
||||
);
|
||||
@@ -1059,7 +1179,6 @@
|
||||
14732BB81960EEB600593899 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
14732BC21960F3FF00593899 /* bin */,
|
||||
14732BBA1960EF7100593899 /* CHANGELOG */,
|
||||
61C268090E2DB5D000175E6C /* LICENSE */,
|
||||
14732BC11960F3B200593899 /* Makefile */,
|
||||
@@ -1073,15 +1192,6 @@
|
||||
path = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
14732BC21960F3FF00593899 /* bin */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
14732BC31960F3FF00593899 /* generate_keys */,
|
||||
14732BC41960F3FF00593899 /* sign_update */,
|
||||
);
|
||||
path = bin;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
1495006D195FBBBD00BC5B5B /* Sparkle */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1091,6 +1201,7 @@
|
||||
089C1665FE841158C02AAC07 /* Framework Resources */,
|
||||
618FA6DB0DB485440026945C /* Installation */,
|
||||
61B5F8F309C4CE5900B25A18 /* Other Sources */,
|
||||
5AF04874214D2E2800B5789F /* Signatures */,
|
||||
6101354A0DD25B7F0049ACDF /* Unarchiving */,
|
||||
61F83F6E0DBFE07A006FDD30 /* Update Control */,
|
||||
61299B3A09CB056100B7442F /* User Interface */,
|
||||
@@ -1126,12 +1237,12 @@
|
||||
34074B8D1FEABD08001CB3A5 /* SPUDownloader.h */,
|
||||
34074B8C1FEABD08001CB3A5 /* SPUDownloader.m */,
|
||||
34074BA41FEAC0BC001CB3A5 /* SPUDownloader_Private.h */,
|
||||
34074B8E1FEABD08001CB3A5 /* SPUDownloaderDelegate.h */,
|
||||
34074BA51FEAC417001CB3A5 /* SPUDownloaderDeprecated.h */,
|
||||
34074BA61FEAC417001CB3A5 /* SPUDownloaderDeprecated.m */,
|
||||
34074B8F1FEABD08001CB3A5 /* SPUDownloaderProtocol.h */,
|
||||
34074BA01FEABFD2001CB3A5 /* SPUDownloaderSession.h */,
|
||||
34074BA11FEABFD2001CB3A5 /* SPUDownloaderSession.m */,
|
||||
34074B8E1FEABD08001CB3A5 /* SPUDownloaderDelegate.h */,
|
||||
34074B8F1FEABD08001CB3A5 /* SPUDownloaderProtocol.h */,
|
||||
34074B941FEABD23001CB3A5 /* SPULocalCacheDirectory.h */,
|
||||
34074B951FEABD23001CB3A5 /* SPULocalCacheDirectory.m */,
|
||||
34074B991FEABD49001CB3A5 /* SPUURLRequest.h */,
|
||||
@@ -1152,20 +1263,71 @@
|
||||
path = Autoupdate;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5A5ADED8214EDE4900DF0099 /* sign_update */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5A5ADED9214EDE4900DF0099 /* main.swift */,
|
||||
);
|
||||
path = sign_update;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5AA96C561E0AE0DB00CA4346 /* generate_appcast */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5AA96C5D1E0AE0F900CA4346 /* Appcast-Bridging-Header.h */,
|
||||
5AE13F9F1E0D4F65000D2C2C /* Appcast.swift */,
|
||||
5AAD00511E0BE6BE00AF411E /* ArchiveItem.swift */,
|
||||
5AE13F771E0C9B12000D2C2C /* DSASignature.swift */,
|
||||
5A5AC5371E0C6D3000998119 /* FeedXML.swift */,
|
||||
5AA96C571E0AE0DB00CA4346 /* main.swift */,
|
||||
5AE13F771E0C9B12000D2C2C /* Signatures.swift */,
|
||||
5A5AC5351E0C6CA300998119 /* Unarchive.swift */,
|
||||
);
|
||||
path = generate_appcast;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5AB8F16E214D560700A1187F /* ed25519 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5AB8F171214D564A00A1187F /* add_scalar.c */,
|
||||
5AB8F174214D564B00A1187F /* ed25519.h */,
|
||||
5AB8F17C214D564B00A1187F /* fe.c */,
|
||||
5AB8F173214D564B00A1187F /* fe.h */,
|
||||
5AB8F179214D564B00A1187F /* fixedint.h */,
|
||||
5AB8F175214D564B00A1187F /* ge.c */,
|
||||
5AB8F17A214D564B00A1187F /* ge.h */,
|
||||
5AB8F178214D564B00A1187F /* key_exchange.c */,
|
||||
5AB8F17F214D564C00A1187F /* keypair.c */,
|
||||
5AB8F176214D564B00A1187F /* precomp_data.h */,
|
||||
5AB8F16F214D564A00A1187F /* sc.c */,
|
||||
5AB8F17E214D564B00A1187F /* sc.h */,
|
||||
5AB8F17B214D564B00A1187F /* seed.c */,
|
||||
5AB8F172214D564B00A1187F /* sha512.c */,
|
||||
5AB8F170214D564A00A1187F /* sha512.h */,
|
||||
5AB8F17D214D564B00A1187F /* sign.c */,
|
||||
5AB8F177214D564B00A1187F /* verify.c */,
|
||||
);
|
||||
path = ed25519;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5AB8F1A0214DA72000A1187F /* generate_keys */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5AB8F1AB214DA8F200A1187F /* Bridging-Header.h */,
|
||||
5AB8F1A1214DA72000A1187F /* main.swift */,
|
||||
);
|
||||
path = generate_keys;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5AF04874214D2E2800B5789F /* Signatures */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5AB8F16E214D560700A1187F /* ed25519 */,
|
||||
5AF04875214D2E5F00B5789F /* SUSignatures.h */,
|
||||
5AF04876214D2E5F00B5789F /* SUSignatures.m */,
|
||||
);
|
||||
name = Signatures;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5D06E8D90FD68C95005AE3F6 /* Binary Delta */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1304,7 +1466,6 @@
|
||||
61B5F91D09C4CF7F00B25A18 /* Test Application */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
72E45DDC1B65C3BD005C701A /* sign_update */,
|
||||
61B5F92A09C4CFD800B25A18 /* InfoPlist.strings */,
|
||||
61B5F92409C4CFC900B25A18 /* main.m */,
|
||||
61B5F92C09C4CFD800B25A18 /* MainMenu.xib */,
|
||||
@@ -1316,8 +1477,6 @@
|
||||
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 */,
|
||||
61B5F90409C4CEE200B25A18 /* TestApplication-Info.plist */,
|
||||
);
|
||||
name = "Test Application";
|
||||
@@ -1329,8 +1488,8 @@
|
||||
children = (
|
||||
61B078CC15A5FB6100600039 /* SUCodeSigningVerifier.h */,
|
||||
61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */,
|
||||
61299A2D09CA2DAB00B7442F /* SUDSAVerifier.h */,
|
||||
61299A2E09CA2DAB00B7442F /* SUDSAVerifier.m */,
|
||||
61299A2D09CA2DAB00B7442F /* SUSignatureVerifier.h */,
|
||||
61299A2E09CA2DAB00B7442F /* SUSignatureVerifier.m */,
|
||||
729924711DF3478A00DBCDF5 /* SUUpdateValidator.h */,
|
||||
729924721DF3478A00DBCDF5 /* SUUpdateValidator.m */,
|
||||
);
|
||||
@@ -1409,6 +1568,9 @@
|
||||
7205C4331E12C23C00E370AE /* ConfigGenerateAppcast.xcconfig */,
|
||||
7205C4351E12CA7000E370AE /* ConfigGenerateAppcastDebug.xcconfig */,
|
||||
7205C4341E12C66D00E370AE /* ConfigGenerateAppcastRelease.xcconfig */,
|
||||
5AB8F1A8214DA85900A1187F /* ConfigGenerateKeys.xcconfig */,
|
||||
5AB8F1AA214DA85900A1187F /* ConfigGenerateKeysDebug.xcconfig */,
|
||||
5AB8F1A9214DA85900A1187F /* ConfigGenerateKeysRelease.xcconfig */,
|
||||
FA1941CE0D94A70100DD942E /* ConfigRelaunch.xcconfig */,
|
||||
FA1941D30D94A70100DD942E /* ConfigRelaunchDebug.xcconfig */,
|
||||
FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */,
|
||||
@@ -1442,27 +1604,36 @@
|
||||
files = (
|
||||
723B25301CEAB3A600909873 /* bscommon.h in Headers */,
|
||||
611142E910FB1BE5009810AA /* bspatch.h in Headers */,
|
||||
5AB8F185214D564C00A1187F /* ed25519.h in Headers */,
|
||||
5AB8F184214D564C00A1187F /* fe.h in Headers */,
|
||||
5AB8F18A214D564C00A1187F /* fixedint.h in Headers */,
|
||||
5AB8F18B214D564C00A1187F /* ge.h in Headers */,
|
||||
5AB8F187214D564C00A1187F /* precomp_data.h in Headers */,
|
||||
5AB8F18F214D564C00A1187F /* sc.h in Headers */,
|
||||
5AB8F181214D564C00A1187F /* sha512.h in Headers */,
|
||||
61299B3609CB04E000B7442F /* Sparkle.h in Headers */,
|
||||
34074B9F1FEABD5A001CB3A5 /* SPUDownloadData.h in Headers */,
|
||||
34074B911FEABD08001CB3A5 /* SPUDownloader.h in Headers */,
|
||||
34074B921FEABD08001CB3A5 /* SPUDownloaderDelegate.h in Headers */,
|
||||
34074BA71FEAC417001CB3A5 /* SPUDownloaderDeprecated.h in Headers */,
|
||||
34074B931FEABD08001CB3A5 /* SPUDownloaderProtocol.h in Headers */,
|
||||
34074BA21FEABFD2001CB3A5 /* SPUDownloaderSession.h in Headers */,
|
||||
34074B961FEABD24001CB3A5 /* SPULocalCacheDirectory.h in Headers */,
|
||||
34074B9B1FEABD49001CB3A5 /* SPUURLRequest.h in Headers */,
|
||||
61B5FC0D09C4FC8200B25A18 /* SUAppcast.h in Headers */,
|
||||
61B5FC7009C51F4A00B25A18 /* SUAppcastItem.h in Headers */,
|
||||
34074BA71FEAC417001CB3A5 /* SPUDownloaderDeprecated.h in Headers */,
|
||||
72316BDE1E0E17910039EFD9 /* SUApplicationInfo.h in Headers */,
|
||||
6120721209CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.h in Headers */,
|
||||
34074B921FEABD08001CB3A5 /* SPUDownloaderDelegate.h in Headers */,
|
||||
34074B961FEABD24001CB3A5 /* SPULocalCacheDirectory.h in Headers */,
|
||||
61B93B270DD0FDD300DCD2F8 /* SUAutomaticUpdateDriver.h in Headers */,
|
||||
61F83F740DBFE141006FDD30 /* SUBasicUpdateDriver.h in Headers */,
|
||||
5D06E9390FD69271005AE3F6 /* SUBinaryDeltaUnarchiver.h in Headers */,
|
||||
72316BD91E0E17180039EFD9 /* SUBundleIcon.h in Headers */,
|
||||
61B078CE15A5FB6100600039 /* SUCodeSigningVerifier.h in Headers */,
|
||||
61299A5C09CA6D4500B7442F /* SUConstants.h in Headers */,
|
||||
6102FE4A0E07803800F85D09 /* SUDiskImageUnarchiver.h in Headers */,
|
||||
61B078CE15A5FB6100600039 /* SUCodeSigningVerifier.h in Headers */,
|
||||
61299A2F09CA2DAB00B7442F /* SUDSAVerifier.h in Headers */,
|
||||
34074B9F1FEABD5A001CB3A5 /* SPUDownloadData.h in Headers */,
|
||||
55E6F33319EC9F6C00005E76 /* SUErrors.h in Headers */,
|
||||
14652F8419A978C200959E44 /* SUExport.h in Headers */,
|
||||
7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */,
|
||||
34074B911FEABD08001CB3A5 /* SPUDownloader.h in Headers */,
|
||||
722954C41D04E66F00ECF9CA /* SUFileOperationConstants.h in Headers */,
|
||||
767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */,
|
||||
61EF67590E25C5B400F754E0 /* SUHost.h in Headers */,
|
||||
@@ -1475,18 +1646,18 @@
|
||||
618FA5050DAE8AB80026945C /* SUPlainInstaller.h in Headers */,
|
||||
6101347B0DD2541A0049ACDF /* SUProbingUpdateDriver.h in Headers */,
|
||||
61B93C090DD112FF00DCD2F8 /* SUScheduledUpdateDriver.h in Headers */,
|
||||
5AF04877214D2E5F00B5789F /* SUSignatures.h in Headers */,
|
||||
61299A2F09CA2DAB00B7442F /* SUSignatureVerifier.h in Headers */,
|
||||
61A225A40D1C4AC000430CCD /* SUStandardVersionComparator.h in Headers */,
|
||||
6196CFF909C72148000DC222 /* SUStatusController.h in Headers */,
|
||||
61A2279C0D1CEE7600430CCD /* SUSystemProfiler.h in Headers */,
|
||||
72316BE31E0E1C7F0039EFD9 /* SUSystemUpdateInfo.h in Headers */,
|
||||
E1545EC51E1D7E0200FAECE8 /* SUTouchBarButtonGroup.h in Headers */,
|
||||
61B93A3C0DD02D7000DCD2F8 /* SUUIBasedUpdateDriver.h in Headers */,
|
||||
34074B931FEABD08001CB3A5 /* SPUDownloaderProtocol.h in Headers */,
|
||||
61299A8D09CA790200B7442F /* SUUnarchiver.h in Headers */,
|
||||
722589DA1E0B19F4005EA0B9 /* SUUnarchiverNotifier.h in Headers */,
|
||||
722589D71E0AD86B005EA0B9 /* SUUnarchiverProtocol.h in Headers */,
|
||||
61B5FCDF09C52A9F00B25A18 /* SUUpdateAlert.h in Headers */,
|
||||
34074B9B1FEABD49001CB3A5 /* SPUURLRequest.h in Headers */,
|
||||
610134730DD250470049ACDF /* SUUpdateDriver.h in Headers */,
|
||||
612DCBAF0D488BC60015DBEA /* SUUpdatePermissionPrompt.h in Headers */,
|
||||
7205C4311E1215AD00E370AE /* SUUpdatePermissionResponse.h in Headers */,
|
||||
@@ -1497,7 +1668,6 @@
|
||||
61A354550DF113C70076ECB1 /* SUUserInitiatedUpdateDriver.h in Headers */,
|
||||
61A2259E0D1C495D00430CCD /* SUVersionComparisonProtocol.h in Headers */,
|
||||
3772FEA913DE0B6B00F79537 /* SUVersionDisplayProtocol.h in Headers */,
|
||||
34074BA21FEABFD2001CB3A5 /* SPUDownloaderSession.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1527,6 +1697,8 @@
|
||||
buildToolPath = bash;
|
||||
buildWorkingDirectory = "";
|
||||
dependencies = (
|
||||
5A5ADEEC214EE65C00DF0099 /* PBXTargetDependency */,
|
||||
5A5ADEEA214EE65A00DF0099 /* PBXTargetDependency */,
|
||||
5AE13FA81E0D7E1C000D2C2C /* PBXTargetDependency */,
|
||||
14732BCB1960F73500593899 /* PBXTargetDependency */,
|
||||
1454BA1619637EDB00344E57 /* PBXTargetDependency */,
|
||||
@@ -1560,6 +1732,22 @@
|
||||
productReference = 55C14BB7136EEF1500649790 /* Autoupdate.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
5A5ADED6214EDE4900DF0099 /* sign_update */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5A5ADEDB214EDE4900DF0099 /* Build configuration list for PBXNativeTarget "sign_update" */;
|
||||
buildPhases = (
|
||||
5A5ADED3214EDE4900DF0099 /* Sources */,
|
||||
5A5ADED4214EDE4900DF0099 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = sign_update;
|
||||
productName = sign_update;
|
||||
productReference = 5A5ADED7214EDE4900DF0099 /* sign_update */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
5AA96C541E0AE0DB00CA4346 /* generate_appcast */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5AA96C5C1E0AE0DC00CA4346 /* Build configuration list for PBXNativeTarget "generate_appcast" */;
|
||||
@@ -1576,6 +1764,22 @@
|
||||
productReference = 5AE13FB31E0D9E07000D2C2C /* generate_appcast */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
5AB8F19E214DA72000A1187F /* generate_keys */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5AB8F1A3214DA72000A1187F /* Build configuration list for PBXNativeTarget "generate_keys" */;
|
||||
buildPhases = (
|
||||
5AB8F19B214DA72000A1187F /* Sources */,
|
||||
5AB8F19C214DA72000A1187F /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = generate_keys;
|
||||
productName = generate_keys;
|
||||
productReference = 5AB8F19F214DA72000A1187F /* generate_keys */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
5D06E8CF0FD68C7C005AE3F6 /* BinaryDelta */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5D06E8DA0FD68C95005AE3F6 /* Build configuration list for PBXNativeTarget "BinaryDelta" */;
|
||||
@@ -1637,7 +1841,6 @@
|
||||
buildPhases = (
|
||||
722954B01D04ADAF00ECF9CA /* Sources */,
|
||||
722954B11D04ADAF00ECF9CA /* Frameworks */,
|
||||
722954B21D04ADAF00ECF9CA /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -1697,10 +1900,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = SU;
|
||||
LastSwiftUpdateCheck = 0800;
|
||||
LastSwiftUpdateCheck = 1000;
|
||||
LastUpgradeCheck = 0920;
|
||||
ORGANIZATIONNAME = "Sparkle Project";
|
||||
TargetAttributes = {
|
||||
5A5ADED6214EDE4900DF0099 = {
|
||||
CreatedOnToolsVersion = 10.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
5AA96C541E0AE0DB00CA4346 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
LastSwiftMigration = 0900;
|
||||
@@ -1791,6 +1998,8 @@
|
||||
726B2B5C1C645FC900388755 /* UI Tests */,
|
||||
722954B31D04ADAF00ECF9CA /* fileop */,
|
||||
5AA96C541E0AE0DB00CA4346 /* generate_appcast */,
|
||||
5AB8F19E214DA72000A1187F /* generate_keys */,
|
||||
5A5ADED6214EDE4900DF0099 /* sign_update */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -1833,11 +2042,8 @@
|
||||
1420DF50196247F900203BB0 /* Images.xcassets in Resources */,
|
||||
61B5F92E09C4CFD800B25A18 /* InfoPlist.strings in Resources */,
|
||||
61B5F92F09C4CFD800B25A18 /* MainMenu.xib in Resources */,
|
||||
72E45DDD1B65C3BD005C701A /* sign_update in Resources */,
|
||||
72E45CFC1B641961005C701A /* sparkletestcast.xml in Resources */,
|
||||
72E45CF81B640DAE005C701A /* SUUpdateSettingsWindowController.xib in Resources */,
|
||||
72E45CFE1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem in Resources */,
|
||||
14732BC01960F2C200593899 /* test_app_only_dsa_pub.pem in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1951,6 +2157,7 @@
|
||||
726F2CE71BC9C3E2001971A4 /* SUOperatingSystem.m in Sources */,
|
||||
55C14F24136EF86F00649790 /* SUPackageInstaller.m in Sources */,
|
||||
55C14F21136EF84D00649790 /* SUPlainInstaller.m in Sources */,
|
||||
5AB8F169214D4AE300A1187F /* SUSignatures.m in Sources */,
|
||||
55C14F22136EF86000649790 /* SUStandardVersionComparator.m in Sources */,
|
||||
55C14F20136EF84300649790 /* SUStatusController.m in Sources */,
|
||||
55C14F23136EF86700649790 /* SUSystemProfiler.m in Sources */,
|
||||
@@ -1959,19 +2166,46 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5A5ADED3214EDE4900DF0099 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5A5ADEDF214EDF6300DF0099 /* add_scalar.c in Sources */,
|
||||
5A5ADEE0214EDF6300DF0099 /* fe.c in Sources */,
|
||||
5A5ADEE1214EDF6300DF0099 /* ge.c in Sources */,
|
||||
5A5ADEE2214EDF6300DF0099 /* key_exchange.c in Sources */,
|
||||
5A5ADEE3214EDF6300DF0099 /* keypair.c in Sources */,
|
||||
5A5ADEDA214EDE4900DF0099 /* main.swift in Sources */,
|
||||
5A5ADEE4214EDF6300DF0099 /* sc.c in Sources */,
|
||||
5A5ADEE5214EDF6300DF0099 /* seed.c in Sources */,
|
||||
5A5ADEE6214EDF6300DF0099 /* sha512.c in Sources */,
|
||||
5A5ADEE7214EDF6300DF0099 /* sign.c in Sources */,
|
||||
5A5ADEE8214EDF6300DF0099 /* verify.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5AA96C511E0AE0DB00CA4346 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5AB8F191214DA5FD00A1187F /* add_scalar.c in Sources */,
|
||||
5AE13FA01E0D4F65000D2C2C /* Appcast.swift in Sources */,
|
||||
5AAD00521E0BE6BE00AF411E /* ArchiveItem.swift in Sources */,
|
||||
5AAD00681E0C2DAB00AF411E /* bscommon.c in Sources */,
|
||||
5AAD00691E0C2DAB00AF411E /* bsdiff.c in Sources */,
|
||||
5AE13FBB1E0DA391000D2C2C /* bspatch.c in Sources */,
|
||||
5AE13F781E0C9B12000D2C2C /* DSASignature.swift in Sources */,
|
||||
5AB8F192214DA5FD00A1187F /* fe.c in Sources */,
|
||||
5A5AC5381E0C6D3000998119 /* FeedXML.swift in Sources */,
|
||||
5AB8F193214DA5FD00A1187F /* ge.c in Sources */,
|
||||
5AB8F194214DA5FD00A1187F /* key_exchange.c in Sources */,
|
||||
5AB8F195214DA5FD00A1187F /* keypair.c in Sources */,
|
||||
5AA96C581E0AE0DB00CA4346 /* main.swift in Sources */,
|
||||
5AAD006A1E0C2DB500AF411E /* sais.c in Sources */,
|
||||
5AB8F196214DA5FD00A1187F /* sc.c in Sources */,
|
||||
5AB8F197214DA5FD00A1187F /* seed.c in Sources */,
|
||||
5AB8F198214DA5FD00A1187F /* sha512.c in Sources */,
|
||||
5AB8F199214DA5FD00A1187F /* sign.c in Sources */,
|
||||
5AE13F781E0C9B12000D2C2C /* Signatures.swift in Sources */,
|
||||
5AE13FBA1E0DA389000D2C2C /* SUBinaryDeltaApply.m in Sources */,
|
||||
5AAD00661E0C2D9B00AF411E /* SUBinaryDeltaCommon.m in Sources */,
|
||||
5AAD00671E0C2D9B00AF411E /* SUBinaryDeltaCreate.m in Sources */,
|
||||
@@ -1987,6 +2221,25 @@
|
||||
5AE13FA11E0D7168000D2C2C /* SUUnarchiver.m in Sources */,
|
||||
5AE13FB71E0D9F42000D2C2C /* SUUnarchiverNotifier.m in Sources */,
|
||||
5A5AC5361E0C6CA300998119 /* Unarchive.swift in Sources */,
|
||||
5AB8F19A214DA5FD00A1187F /* verify.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5AB8F19B214DA72000A1187F /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5AB8F1AC214DAB9D00A1187F /* add_scalar.c in Sources */,
|
||||
5AB8F1AD214DAB9D00A1187F /* fe.c in Sources */,
|
||||
5AB8F1AE214DAB9D00A1187F /* ge.c in Sources */,
|
||||
5AB8F1AF214DAB9D00A1187F /* key_exchange.c in Sources */,
|
||||
5AB8F1B0214DAB9D00A1187F /* keypair.c in Sources */,
|
||||
5AB8F1A2214DA72000A1187F /* main.swift in Sources */,
|
||||
5AB8F1B1214DAB9D00A1187F /* sc.c in Sources */,
|
||||
5AB8F1B2214DAB9D00A1187F /* seed.c in Sources */,
|
||||
5AB8F1B3214DAB9D00A1187F /* sha512.c in Sources */,
|
||||
5AB8F1B4214DAB9D00A1187F /* sign.c in Sources */,
|
||||
5AB8F1B5214DAB9D00A1187F /* verify.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -2017,8 +2270,8 @@
|
||||
721CF1A71AD7643600D9AC09 /* bsdiff.c in Sources */,
|
||||
721CF1A81AD7644100D9AC09 /* bspatch.c in Sources */,
|
||||
721CF1A91AD7644C00D9AC09 /* sais.c in Sources */,
|
||||
5A4094481C74EA5200983BE0 /* SUAppcastTest.swift in Sources */,
|
||||
342731481FF58E5B00285FBD /* SPUDownloaderTest.swift in Sources */,
|
||||
5A4094481C74EA5200983BE0 /* SUAppcastTest.swift in Sources */,
|
||||
72D4DAA11AD7632900B211E2 /* SUBinaryDeltaCreate.m in Sources */,
|
||||
142E0E0919A83AAC00E4312B /* SUBinaryDeltaTest.m in Sources */,
|
||||
F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */,
|
||||
@@ -2039,11 +2292,21 @@
|
||||
files = (
|
||||
61B5F93009C4CFDC00B25A18 /* main.m in Sources */,
|
||||
726F2CEB1BC9C733001971A4 /* SUConstants.m in Sources */,
|
||||
5FD37CA0216B3E5A0003A1B6 /* key_exchange.c in Sources */,
|
||||
5FD37C9E216B3E5A0003A1B6 /* fe.c in Sources */,
|
||||
5FD37C9F216B3E5A0003A1B6 /* ge.c in Sources */,
|
||||
5A6D31EE1BF53245009C5157 /* SUFileManager.m in Sources */,
|
||||
721BC2111D1DFF05002BC71E /* SUFileOperationConstants.m in Sources */,
|
||||
5FD37CA2216B3E5A0003A1B6 /* sc.c in Sources */,
|
||||
5A6D31EF1BF5325F009C5157 /* SUOperatingSystem.m in Sources */,
|
||||
72E45CF31B640CDD005C701A /* SUTestApplicationDelegate.m in Sources */,
|
||||
5FD37CA6216B3E5A0003A1B6 /* verify.c in Sources */,
|
||||
5FD37CA3216B3E5A0003A1B6 /* seed.c in Sources */,
|
||||
A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */,
|
||||
5FD37C9D216B3E5A0003A1B6 /* add_scalar.c in Sources */,
|
||||
5FD37CA4216B3E5A0003A1B6 /* sha512.c in Sources */,
|
||||
5FD37CA5216B3E5A0003A1B6 /* sign.c in Sources */,
|
||||
5FD37CA1216B3E5A0003A1B6 /* keypair.c in Sources */,
|
||||
72E45CF71B640DAE005C701A /* SUUpdateSettingsWindowController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -2072,9 +2335,23 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5AB8F182214D564C00A1187F /* add_scalar.c in Sources */,
|
||||
723B252D1CEAB3A600909873 /* bscommon.c in Sources */,
|
||||
34074B9E1FEABD5A001CB3A5 /* SPUDownloadData.m in Sources */,
|
||||
5D06E8EB0FD68CE4005AE3F6 /* bspatch.c in Sources */,
|
||||
5AB8F18D214D564C00A1187F /* fe.c in Sources */,
|
||||
5AB8F186214D564C00A1187F /* ge.c in Sources */,
|
||||
5AB8F189214D564C00A1187F /* key_exchange.c in Sources */,
|
||||
5AB8F190214D564C00A1187F /* keypair.c in Sources */,
|
||||
5AB8F180214D564C00A1187F /* sc.c in Sources */,
|
||||
5AB8F18C214D564C00A1187F /* seed.c in Sources */,
|
||||
5AB8F183214D564C00A1187F /* sha512.c in Sources */,
|
||||
5AB8F18E214D564C00A1187F /* sign.c in Sources */,
|
||||
34074B9E1FEABD5A001CB3A5 /* SPUDownloadData.m in Sources */,
|
||||
34074B901FEABD08001CB3A5 /* SPUDownloader.m in Sources */,
|
||||
34074BA81FEAC417001CB3A5 /* SPUDownloaderDeprecated.m in Sources */,
|
||||
34074BA31FEABFD2001CB3A5 /* SPUDownloaderSession.m in Sources */,
|
||||
34074B971FEABD24001CB3A5 /* SPULocalCacheDirectory.m in Sources */,
|
||||
34074B9A1FEABD49001CB3A5 /* SPUURLRequest.m in Sources */,
|
||||
61B5FBB709C4FAFF00B25A18 /* SUAppcast.m in Sources */,
|
||||
61B5FC6F09C51F4900B25A18 /* SUAppcastItem.m in Sources */,
|
||||
72316BDF1E0E17910039EFD9 /* SUApplicationInfo.m in Sources */,
|
||||
@@ -2082,21 +2359,17 @@
|
||||
61B93B280DD0FDD300DCD2F8 /* SUAutomaticUpdateDriver.m in Sources */,
|
||||
61F83F720DBFE140006FDD30 /* SUBasicUpdateDriver.m in Sources */,
|
||||
5D06E8EC0FD68CE4005AE3F6 /* SUBinaryDeltaApply.m in Sources */,
|
||||
34074B971FEABD24001CB3A5 /* SPULocalCacheDirectory.m in Sources */,
|
||||
5D06E8ED0FD68CE4005AE3F6 /* SUBinaryDeltaCommon.m in Sources */,
|
||||
34074BA31FEABFD2001CB3A5 /* SPUDownloaderSession.m in Sources */,
|
||||
5D06E93A0FD69271005AE3F6 /* SUBinaryDeltaUnarchiver.m in Sources */,
|
||||
72316BDA1E0E17180039EFD9 /* SUBundleIcon.m in Sources */,
|
||||
61B078CF15A5FB6100600039 /* SUCodeSigningVerifier.m in Sources */,
|
||||
61299A6009CA6EB100B7442F /* SUConstants.m in Sources */,
|
||||
6102FE4B0E07803800F85D09 /* SUDiskImageUnarchiver.m in Sources */,
|
||||
61299A3009CA2DAB00B7442F /* SUDSAVerifier.m in Sources */,
|
||||
7275F9C21B5F1F2900B1D19E /* SUFileManager.m in Sources */,
|
||||
722954C51D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */,
|
||||
767B61AD1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */,
|
||||
61EF67560E25B58D00F754E0 /* SUHost.m in Sources */,
|
||||
618FA5020DAE88B40026945C /* SUInstaller.m in Sources */,
|
||||
34074B901FEABD08001CB3A5 /* SPUDownloader.m in Sources */,
|
||||
55C14F07136EF6DB00649790 /* SULog.m in Sources */,
|
||||
726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */,
|
||||
618FA5230DAE8E8A0026945C /* SUPackageInstaller.m in Sources */,
|
||||
@@ -2104,12 +2377,12 @@
|
||||
618FA5060DAE8AB80026945C /* SUPlainInstaller.m in Sources */,
|
||||
6101347C0DD2541A0049ACDF /* SUProbingUpdateDriver.m in Sources */,
|
||||
61B93C0A0DD112FF00DCD2F8 /* SUScheduledUpdateDriver.m in Sources */,
|
||||
34074BA81FEAC417001CB3A5 /* SPUDownloaderDeprecated.m in Sources */,
|
||||
5AF04878214D2E5F00B5789F /* SUSignatures.m in Sources */,
|
||||
61299A3009CA2DAB00B7442F /* SUSignatureVerifier.m in Sources */,
|
||||
61A225A50D1C4AC000430CCD /* SUStandardVersionComparator.m in Sources */,
|
||||
6196CFFA09C72149000DC222 /* SUStatusController.m in Sources */,
|
||||
61A2279D0D1CEE7600430CCD /* SUSystemProfiler.m in Sources */,
|
||||
72316BE41E0E1C7F0039EFD9 /* SUSystemUpdateInfo.m in Sources */,
|
||||
34074B9A1FEABD49001CB3A5 /* SPUURLRequest.m in Sources */,
|
||||
E1545EC61E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m in Sources */,
|
||||
61B93A3D0DD02D7000DCD2F8 /* SUUIBasedUpdateDriver.m in Sources */,
|
||||
61299A8E09CA790200B7442F /* SUUnarchiver.m in Sources */,
|
||||
@@ -2121,6 +2394,7 @@
|
||||
61B5F8EE09C4CE3C00B25A18 /* SUUpdater.m in Sources */,
|
||||
729924741DF3478A00DBCDF5 /* SUUpdateValidator.m in Sources */,
|
||||
61A354560DF113C70076ECB1 /* SUUserInitiatedUpdateDriver.m in Sources */,
|
||||
5AB8F188214D564C00A1187F /* verify.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -2177,6 +2451,26 @@
|
||||
target = 55C14BB6136EEF1500649790 /* Autoupdate */;
|
||||
targetProxy = 55C14F96136F044100649790 /* PBXContainerItemProxy */;
|
||||
};
|
||||
5A5ADEEA214EE65A00DF0099 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5AB8F19E214DA72000A1187F /* generate_keys */;
|
||||
targetProxy = 5A5ADEE9214EE65A00DF0099 /* PBXContainerItemProxy */;
|
||||
};
|
||||
5A5ADEEC214EE65C00DF0099 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5A5ADED6214EDE4900DF0099 /* sign_update */;
|
||||
targetProxy = 5A5ADEEB214EE65C00DF0099 /* PBXContainerItemProxy */;
|
||||
};
|
||||
5A5ADEEE214EE66E00DF0099 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5AB8F19E214DA72000A1187F /* generate_keys */;
|
||||
targetProxy = 5A5ADEED214EE66E00DF0099 /* PBXContainerItemProxy */;
|
||||
};
|
||||
5A5ADEF0214EE67100DF0099 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5A5ADED6214EDE4900DF0099 /* sign_update */;
|
||||
targetProxy = 5A5ADEEF214EE67100DF0099 /* PBXContainerItemProxy */;
|
||||
};
|
||||
5AE13FA81E0D7E1C000D2C2C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5AA96C541E0AE0DB00CA4346 /* generate_appcast */;
|
||||
@@ -2225,7 +2519,9 @@
|
||||
555CF29B196C523E0000B31E /* el */,
|
||||
55C14BDE136EF20D00649790 /* en */,
|
||||
55C14BDF136EF20D00649790 /* es */,
|
||||
55BACC1920AF2C6D00ECEBB6 /* fi */,
|
||||
55C14BE0136EF20D00649790 /* fr */,
|
||||
0A8DAD74207FA6F300FFD934 /* hu */,
|
||||
55C14BE1136EF20D00649790 /* is */,
|
||||
55C14BE2136EF20D00649790 /* it */,
|
||||
55C14BE3136EF20D00649790 /* ja */,
|
||||
@@ -2245,8 +2541,6 @@
|
||||
0263187514FEBB42005EBF43 /* uk */,
|
||||
55C14BEC136EF20D00649790 /* zh_CN */,
|
||||
55C14BED136EF20D00649790 /* zh_TW */,
|
||||
0A8DAD74207FA6F300FFD934 /* hu */,
|
||||
55BACC1920AF2C6D00ECEBB6 /* fi */,
|
||||
);
|
||||
name = SUAutomaticUpdateAlert.xib;
|
||||
sourceTree = "<group>";
|
||||
@@ -2261,7 +2555,9 @@
|
||||
555CF29C196C52460000B31E /* el */,
|
||||
55C14BF4136EF26100649790 /* en */,
|
||||
55C14BF5136EF26100649790 /* es */,
|
||||
55BACC1820AF2C5B00ECEBB6 /* fi */,
|
||||
55C14BF6136EF26100649790 /* fr */,
|
||||
0A8DAD75207FA6F300FFD934 /* hu */,
|
||||
55C14BF7136EF26100649790 /* is */,
|
||||
55C14BF8136EF26100649790 /* it */,
|
||||
55C14BF9136EF26100649790 /* ja */,
|
||||
@@ -2281,8 +2577,6 @@
|
||||
0263187614FEBB42005EBF43 /* uk */,
|
||||
55C14C02136EF26100649790 /* zh_CN */,
|
||||
55C14C03136EF26100649790 /* zh_TW */,
|
||||
0A8DAD75207FA6F300FFD934 /* hu */,
|
||||
55BACC1820AF2C5B00ECEBB6 /* fi */,
|
||||
);
|
||||
name = SUUpdateAlert.xib;
|
||||
sourceTree = "<group>";
|
||||
@@ -2297,7 +2591,9 @@
|
||||
555CF29D196C524C0000B31E /* el */,
|
||||
55C14C09136EF2C700649790 /* en */,
|
||||
55C14C0A136EF2C700649790 /* es */,
|
||||
55BACC1A20AF2C7D00ECEBB6 /* fi */,
|
||||
55C14C0B136EF2C700649790 /* fr */,
|
||||
0A8DAD76207FA6F400FFD934 /* hu */,
|
||||
55C14C0C136EF2C700649790 /* is */,
|
||||
55C14C0D136EF2C700649790 /* it */,
|
||||
55C14C0E136EF2C700649790 /* ja */,
|
||||
@@ -2317,8 +2613,6 @@
|
||||
0263187714FEBB42005EBF43 /* uk */,
|
||||
55C14C17136EF2C700649790 /* zh_CN */,
|
||||
55C14C18136EF2C700649790 /* zh_TW */,
|
||||
0A8DAD76207FA6F400FFD934 /* hu */,
|
||||
55BACC1A20AF2C7D00ECEBB6 /* fi */,
|
||||
);
|
||||
name = SUUpdatePermissionPrompt.xib;
|
||||
sourceTree = "<group>";
|
||||
@@ -2337,6 +2631,7 @@
|
||||
147D6DA91B66EC22006607AB /* fi */,
|
||||
61AAE8590A321B0400D8810D /* fr */,
|
||||
147D6DAA1B66EC25006607AB /* he */,
|
||||
0A8DAD73207FA6F300FFD934 /* hu */,
|
||||
613151B20FB4946A000DCD59 /* is */,
|
||||
61F614540E24A12D009F47E7 /* it */,
|
||||
611A904610240DF700CC659E /* ja */,
|
||||
@@ -2356,7 +2651,6 @@
|
||||
0263187214FEBB31005EBF43 /* uk */,
|
||||
61131A090F846D0A00E97AF6 /* zh_CN */,
|
||||
61131A0A0F846D1100E97AF6 /* zh_TW */,
|
||||
0A8DAD73207FA6F300FFD934 /* hu */,
|
||||
);
|
||||
name = Sparkle.strings;
|
||||
sourceTree = "<group>";
|
||||
@@ -2377,6 +2671,7 @@
|
||||
1A985A331C5C329D0001163A /* fr */,
|
||||
1A985A4B1C5C32B60001163A /* fr-CA */,
|
||||
1A985A3D1C5C32A80001163A /* he */,
|
||||
0A8DAD77207FA6F400FFD934 /* hu */,
|
||||
1A985A3F1C5C32AA0001163A /* id */,
|
||||
1A985A401C5C32AA0001163A /* is */,
|
||||
1A985A361C5C32A20001163A /* it */,
|
||||
@@ -2398,7 +2693,6 @@
|
||||
1A985A511C5C32BB0001163A /* uk */,
|
||||
1A985A4A1C5C32B50001163A /* zh-Hans */,
|
||||
1A985A351C5C329E0001163A /* zh-Hant */,
|
||||
0A8DAD77207FA6F400FFD934 /* hu */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
@@ -2567,6 +2861,34 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5A5ADEDC214EDE4900DF0099 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5AB8F1AA214DA85900A1187F /* ConfigGenerateKeysDebug.xcconfig */;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5A5ADEDD214EDE4900DF0099 /* Coverage */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5AB8F1AA214DA85900A1187F /* ConfigGenerateKeysDebug.xcconfig */;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Coverage;
|
||||
};
|
||||
5A5ADEDE214EDE4900DF0099 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5AB8F1A9214DA85900A1187F /* ConfigGenerateKeysRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5AA96C591E0AE0DC00CA4346 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7205C4351E12CA7000E370AE /* ConfigGenerateAppcastDebug.xcconfig */;
|
||||
@@ -2588,6 +2910,36 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5AB8F1A4214DA72000A1187F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5AB8F1AA214DA85900A1187F /* ConfigGenerateKeysDebug.xcconfig */;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5AB8F1A5214DA72000A1187F /* Coverage */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5AB8F1AA214DA85900A1187F /* ConfigGenerateKeysDebug.xcconfig */;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Coverage;
|
||||
};
|
||||
5AB8F1A6214DA72000A1187F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5AB8F1A9214DA85900A1187F /* ConfigGenerateKeysRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5D06E8D20FD68C7D005AE3F6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5D06E8F20FD68D21005AE3F6 /* ConfigBinaryDeltaDebug.xcconfig */;
|
||||
@@ -2741,6 +3093,16 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5A5ADEDB214EDE4900DF0099 /* Build configuration list for PBXNativeTarget "sign_update" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5A5ADEDC214EDE4900DF0099 /* Debug */,
|
||||
5A5ADEDD214EDE4900DF0099 /* Coverage */,
|
||||
5A5ADEDE214EDE4900DF0099 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5AA96C5C1E0AE0DC00CA4346 /* Build configuration list for PBXNativeTarget "generate_appcast" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
@@ -2751,6 +3113,16 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5AB8F1A3214DA72000A1187F /* Build configuration list for PBXNativeTarget "generate_keys" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5AB8F1A4214DA72000A1187F /* Debug */,
|
||||
5AB8F1A5214DA72000A1187F /* Coverage */,
|
||||
5AB8F1A6214DA72000A1187F /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5D06E8DA0FD68C95005AE3F6 /* Build configuration list for PBXNativeTarget "BinaryDelta" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
Vendored
+1
@@ -150,6 +150,7 @@
|
||||
-(void)cleanup
|
||||
{
|
||||
[self.download cancel];
|
||||
[self.downloadSession invalidateAndCancel];
|
||||
self.download = nil;
|
||||
self.downloadSession = nil;
|
||||
[super cleanup];
|
||||
|
||||
Vendored
+2
-1
@@ -15,13 +15,14 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import "SUExport.h"
|
||||
@class SUSignatures;
|
||||
|
||||
SU_EXPORT @interface SUAppcastItem : NSObject
|
||||
@property (copy, readonly) NSString *title;
|
||||
@property (copy, readonly) NSString *dateString;
|
||||
@property (copy, readonly) NSString *itemDescription;
|
||||
@property (strong, readonly) NSURL *releaseNotesURL;
|
||||
@property (copy, readonly) NSString *DSASignature;
|
||||
@property (strong, readonly) SUSignatures *signatures;
|
||||
@property (copy, readonly) NSString *minimumSystemVersion;
|
||||
@property (copy, readonly) NSString *maximumSystemVersion;
|
||||
@property (strong, readonly) NSURL *fileURL;
|
||||
|
||||
Vendored
+5
-5
@@ -9,7 +9,7 @@
|
||||
#import "SUAppcastItem.h"
|
||||
#import "SULog.h"
|
||||
#import "SUConstants.h"
|
||||
|
||||
#import "SUSignatures.h"
|
||||
|
||||
#include "AppKitPrevention.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
@property (copy, readwrite) NSString *dateString;
|
||||
@property (copy, readwrite) NSString *itemDescription;
|
||||
@property (strong, readwrite) NSURL *releaseNotesURL;
|
||||
@property (copy, readwrite) NSString *DSASignature;
|
||||
@property (strong, readwrite) SUSignatures *signatures;
|
||||
@property (copy, readwrite) NSString *minimumSystemVersion;
|
||||
@property (copy, readwrite) NSString *maximumSystemVersion;
|
||||
@property (strong, readwrite) NSURL *fileURL;
|
||||
@@ -34,7 +34,7 @@
|
||||
@synthesize dateString;
|
||||
@synthesize deltaUpdates;
|
||||
@synthesize displayVersionString;
|
||||
@synthesize DSASignature;
|
||||
@synthesize signatures;
|
||||
@synthesize fileURL;
|
||||
@synthesize contentLength = _contentLength;
|
||||
@synthesize infoURL;
|
||||
@@ -156,10 +156,10 @@
|
||||
self.fileURL = [NSURL URLWithString:fileURLString];
|
||||
}
|
||||
if (enclosure) {
|
||||
self.DSASignature = [enclosure objectForKey:SUAppcastAttributeDSASignature];
|
||||
self.signatures = [[SUSignatures alloc] initWithDsa:[enclosure objectForKey:SUAppcastAttributeDSASignature] ed:[enclosure objectForKey:SUAppcastAttributeEDSignature]];
|
||||
self.osString = [enclosure objectForKey:SUAppcastAttributeOsType];
|
||||
}
|
||||
|
||||
|
||||
self.versionString = newVersion;
|
||||
self.minimumSystemVersion = [dict objectForKey:SUAppcastElementMinimumSystemVersion];
|
||||
self.maximumSystemVersion = [dict objectForKey:SUAppcastElementMaximumSystemVersion];
|
||||
|
||||
Vendored
+10
-8
@@ -357,18 +357,20 @@
|
||||
id<SUUpdaterPrivate> updater = self.updater;
|
||||
id<SUUnarchiverProtocol> unarchiver = [SUUnarchiver unarchiverForPath:self.downloadPath updatingHostBundlePath:self.host.bundlePath decryptionPassword:updater.decryptionPassword];
|
||||
|
||||
BOOL success;
|
||||
BOOL success = NO;
|
||||
if (!unarchiver) {
|
||||
SULog(SULogLevelError, @"Error: No valid unarchiver for %@!", self.downloadPath);
|
||||
|
||||
success = NO;
|
||||
} else {
|
||||
self.updateValidator = [[SUUpdateValidator alloc] initWithDownloadPath:self.downloadPath signatures:self.updateItem.signatures host:self.host];
|
||||
|
||||
// Currently unsafe archives are the only case where we can prevalidate before extraction, but that could change in the future
|
||||
BOOL needsPrevalidation = [[unarchiver class] unsafeIfArchiveIsNotValidated];
|
||||
|
||||
self.updateValidator = [[SUUpdateValidator alloc] initWithDownloadPath:self.downloadPath dsaSignature:self.updateItem.DSASignature host:self.host performingPrevalidation:needsPrevalidation];
|
||||
|
||||
success = self.updateValidator.canValidate;
|
||||
BOOL needsPrevalidation = [[unarchiver class] mustValidateBeforeExtraction];
|
||||
|
||||
if (needsPrevalidation) {
|
||||
success = [self.updateValidator validateDownloadPath];
|
||||
} else {
|
||||
success = YES;
|
||||
}
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
|
||||
Vendored
+5
@@ -190,6 +190,11 @@ NSString *hashOfTreeWithVersion(NSString *path, uint16_t majorVersion)
|
||||
|
||||
if (MAJOR_VERSION_IS_AT_LEAST(majorVersion, SUBeigeMajorVersion)) {
|
||||
uint16_t mode = ent->fts_statp->st_mode;
|
||||
// permission of symlinks is irrelevant and can't be changed.
|
||||
// hardcoding a value helps avoid differences between filesystems.
|
||||
if (ent->fts_info == FTS_SL) {
|
||||
mode = 0755;
|
||||
}
|
||||
uint16_t type = ent->fts_info;
|
||||
uint16_t permissions = mode & PERMISSION_FLAGS;
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -33,7 +33,7 @@
|
||||
return [[path pathExtension] isEqualToString:@"delta"];
|
||||
}
|
||||
|
||||
+ (BOOL)unsafeIfArchiveIsNotValidated
|
||||
+ (BOOL)mustValidateBeforeExtraction
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
Vendored
+3
@@ -41,6 +41,8 @@ extern NSString *const SUSkippedVersionKey;
|
||||
extern NSString *const SUScheduledCheckIntervalKey;
|
||||
extern NSString *const SULastCheckTimeKey;
|
||||
extern NSString *const SUExpectsDSASignatureKey;
|
||||
extern NSString *const SUExpectsEDSignatureKey;
|
||||
extern NSString *const SUPublicEDKeyKey;
|
||||
extern NSString *const SUPublicDSAKeyKey;
|
||||
extern NSString *const SUPublicDSAKeyFileKey;
|
||||
extern NSString *const SUAutomaticallyUpdateKey;
|
||||
@@ -64,6 +66,7 @@ extern NSString *const SURelaunchToolNameKey __attribute__((deprecated("This key
|
||||
|
||||
extern NSString *const SUAppcastAttributeDeltaFrom;
|
||||
extern NSString *const SUAppcastAttributeDSASignature;
|
||||
extern NSString *const SUAppcastAttributeEDSignature;
|
||||
extern NSString *const SUAppcastAttributeShortVersionString;
|
||||
extern NSString *const SUAppcastAttributeVersion;
|
||||
extern NSString *const SUAppcastAttributeOsType;
|
||||
|
||||
Vendored
+3
@@ -33,6 +33,8 @@ NSString *const SUSkippedVersionKey = @"SUSkippedVersion";
|
||||
NSString *const SUScheduledCheckIntervalKey = @"SUScheduledCheckInterval";
|
||||
NSString *const SULastCheckTimeKey = @"SULastCheckTime";
|
||||
NSString *const SUExpectsDSASignatureKey = @"SUExpectsDSASignature";
|
||||
NSString *const SUExpectsEDSignatureKey = @"SUExpectsEDSignatureKey";
|
||||
NSString *const SUPublicEDKeyKey = @"SUPublicEDKey";
|
||||
NSString *const SUPublicDSAKeyKey = @"SUPublicDSAKey";
|
||||
NSString *const SUPublicDSAKeyFileKey = @"SUPublicDSAKeyFile";
|
||||
NSString *const SUAutomaticallyUpdateKey = @"SUAutomaticallyUpdate";
|
||||
@@ -54,6 +56,7 @@ NSString *const SURelaunchToolNameKey = @"SURelaunchToolName";
|
||||
|
||||
NSString *const SUAppcastAttributeDeltaFrom = @"sparkle:deltaFrom";
|
||||
NSString *const SUAppcastAttributeDSASignature = @"sparkle:dsaSignature";
|
||||
NSString *const SUAppcastAttributeEDSignature = @"sparkle:edSignature";
|
||||
NSString *const SUAppcastAttributeShortVersionString = @"sparkle:shortVersionString";
|
||||
NSString *const SUAppcastAttributeVersion = @"sparkle:version";
|
||||
NSString *const SUAppcastAttributeOsType = @"sparkle:os";
|
||||
|
||||
Vendored
-37
@@ -1,37 +0,0 @@
|
||||
//
|
||||
// SUDSAVerifier.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 3/16/06.
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
// Includes code by Zach Waldowski on 10/18/13.
|
||||
// Copyright 2014 Big Nerd Ranch. Licensed under MIT.
|
||||
//
|
||||
// Includes code from Plop by Mark Hamlin.
|
||||
// Copyright 2011 Mark Hamlin. Licensed under BSD.
|
||||
//
|
||||
|
||||
#ifndef SUDSAVERIFIER_H
|
||||
#define SUDSAVERIFIER_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 1090
|
||||
@interface NSData (SUDSAVerifier)
|
||||
- (id)initWithBase64Encoding:(NSString *)base64String;
|
||||
@end
|
||||
#endif
|
||||
|
||||
@interface SUDSAVerifier : NSObject
|
||||
|
||||
+ (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature withPublicDSAKey:(NSString *)pkeyString;
|
||||
|
||||
- (instancetype)initWithPublicKeyData:(NSData *)data;
|
||||
|
||||
- (BOOL)verifyFileAtPath:(NSString *)path signature:(NSData *)signature;
|
||||
- (BOOL)verifyStream:(NSInputStream *)stream signature:(NSData *)signature;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
Vendored
+1
-1
@@ -30,7 +30,7 @@
|
||||
return [[path pathExtension] isEqualToString:@"dmg"];
|
||||
}
|
||||
|
||||
+ (BOOL)unsafeIfArchiveIsNotValidated
|
||||
+ (BOOL)mustValidateBeforeExtraction
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
Vendored
+4
-1
@@ -7,6 +7,8 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class SUPublicKeys;
|
||||
|
||||
@interface SUHost : NSObject
|
||||
|
||||
@property (strong, readonly) NSBundle *bundle;
|
||||
@@ -16,8 +18,9 @@
|
||||
@property (readonly, copy) NSString *name;
|
||||
@property (readonly, copy) NSString *version;
|
||||
@property (readonly, copy) NSString *displayVersion;
|
||||
@property (readonly) SUPublicKeys *publicKeys;
|
||||
|
||||
@property (getter=isRunningOnReadOnlyVolume, readonly) BOOL runningOnReadOnlyVolume;
|
||||
@property (readonly, copy) NSString *publicDSAKey;
|
||||
@property (readonly, nonatomic, copy) NSString *publicDSAKeyFileKey;
|
||||
|
||||
- (id)objectForInfoDictionaryKey:(NSString *)key;
|
||||
|
||||
Vendored
+12
-1
@@ -10,7 +10,7 @@
|
||||
#import "SUConstants.h"
|
||||
#include <sys/mount.h> // For statfs for isRunningOnReadOnlyVolume
|
||||
#import "SULog.h"
|
||||
|
||||
#import "SUSignatures.h"
|
||||
|
||||
#include "AppKitPrevention.h"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
@property (nonatomic, readonly) BOOL isMainBundle;
|
||||
@property (copy) NSString *defaultsDomain;
|
||||
@property (assign) BOOL usesStandardUserDefaults;
|
||||
@property (readonly, copy) NSString *publicDSAKey;
|
||||
|
||||
@end
|
||||
|
||||
@@ -109,6 +110,11 @@
|
||||
return (statfs_info.f_flags & MNT_RDONLY) != 0;
|
||||
}
|
||||
|
||||
- (NSString *__nullable)publicEDKey
|
||||
{
|
||||
return [self objectForInfoDictionaryKey:SUPublicEDKeyKey];
|
||||
}
|
||||
|
||||
- (NSString *__nullable)publicDSAKey
|
||||
{
|
||||
// Maybe the key is just a string in the Info.plist.
|
||||
@@ -135,6 +141,11 @@
|
||||
return key;
|
||||
}
|
||||
|
||||
- (SUPublicKeys *)publicKeys
|
||||
{
|
||||
return [[SUPublicKeys alloc] initWithDsa:[self publicDSAKey] ed:[self publicEDKey]];
|
||||
}
|
||||
|
||||
- (NSString * __nullable)publicDSAKeyFileKey
|
||||
{
|
||||
return [self objectForInfoDictionaryKey:SUPublicDSAKeyFileKey];
|
||||
|
||||
Vendored
+1
-1
@@ -63,7 +63,7 @@ void SULog(SULogLevel level, NSString *format, ...)
|
||||
}
|
||||
|
||||
NSString *displayName = [[NSFileManager defaultManager] displayNameAtPath:mainBundle.bundlePath];
|
||||
client = asl_open([displayName stringByAppendingString:@" [Sparkle]"].UTF8String, SPARKLE_BUNDLE_IDENTIFIER, options);
|
||||
client = asl_open([displayName stringByAppendingString:@" [Sparkle " TO_STRING(SPARKLE_VERSION) "]"].UTF8String, SPARKLE_BUNDLE_IDENTIFIER, options);
|
||||
queue = dispatch_queue_create(NULL, DISPATCH_QUEUE_SERIAL);
|
||||
}
|
||||
});
|
||||
|
||||
Vendored
+1
-1
@@ -58,7 +58,7 @@
|
||||
return ([self commandAndArgumentsConformingToTypeOfPath:path] != nil);
|
||||
}
|
||||
|
||||
+ (BOOL)unsafeIfArchiveIsNotValidated
|
||||
+ (BOOL)mustValidateBeforeExtraction
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// SUDSAVerifier.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 3/16/06.
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
// Includes code by Zach Waldowski on 10/18/13.
|
||||
// Copyright 2014 Big Nerd Ranch. Licensed under MIT.
|
||||
//
|
||||
// Includes code from Plop by Mark Hamlin.
|
||||
// Copyright 2011 Mark Hamlin. Licensed under BSD.
|
||||
//
|
||||
|
||||
#ifndef SUDSAVERIFIER_H
|
||||
#define SUDSAVERIFIER_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@class SUSignatures;
|
||||
@class SUPublicKeys;
|
||||
|
||||
@interface SUSignatureVerifier : NSObject
|
||||
|
||||
+ (BOOL)validatePath:(NSString *)path withSignatures:(SUSignatures *)signatures withPublicKeys:(SUPublicKeys *)pkeys;
|
||||
|
||||
- (instancetype)initWithPublicKeys:(SUPublicKeys *)pkeys;
|
||||
|
||||
- (BOOL)verifyFileAtPath:(NSString *)path signatures:(SUSignatures *)signatures;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+84
-36
@@ -12,43 +12,46 @@
|
||||
// Copyright 2011 Mark Hamlin. Licensed under BSD.
|
||||
//
|
||||
|
||||
#import "SUDSAVerifier.h"
|
||||
#import "SUSignatureVerifier.h"
|
||||
#import "SULog.h"
|
||||
#import "SUSignatures.h"
|
||||
#include <CommonCrypto/CommonDigest.h>
|
||||
#import "../ed25519/src/ed25519.h" // run `git submodule update --init` if you get an erorr here
|
||||
|
||||
|
||||
#include "AppKitPrevention.h"
|
||||
|
||||
@implementation SUDSAVerifier {
|
||||
SecKeyRef _secKey;
|
||||
@interface SUSignatureVerifier ()
|
||||
@property (readonly) SUPublicKeys *pubKeys;
|
||||
@end
|
||||
|
||||
@implementation SUSignatureVerifier {
|
||||
}
|
||||
|
||||
+ (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature withPublicDSAKey:(NSString *)pkeyString
|
||||
@synthesize pubKeys = _pubKeys;
|
||||
|
||||
+ (BOOL)validatePath:(NSString *)path withSignatures:(SUSignatures *)signatures withPublicKeys:(SUPublicKeys *)pkeys
|
||||
{
|
||||
if (!encodedSignature) {
|
||||
SULog(SULogLevelError, @"There is no DSA signature to check");
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (!path) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
SUDSAVerifier *verifier = [(SUDSAVerifier *)[self alloc] initWithPublicKeyData:[pkeyString dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
SUSignatureVerifier *verifier = [(SUSignatureVerifier *)[self alloc] initWithPublicKeys:pkeys];
|
||||
|
||||
if (!verifier) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSString *strippedSignature = [encodedSignature stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];
|
||||
NSData *signature = [[NSData alloc] initWithBase64Encoding:strippedSignature];
|
||||
return [verifier verifyFileAtPath:path signature:signature];
|
||||
return [verifier verifyFileAtPath:path signatures:signatures];
|
||||
}
|
||||
|
||||
- (instancetype)initWithPublicKeyData:(NSData *)data
|
||||
- (instancetype)initWithPublicKeys:(SUPublicKeys *)pubkeys
|
||||
{
|
||||
self = [super init];
|
||||
_pubKeys = pubkeys;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (SecKeyRef)dsaSecKeyRef {
|
||||
|
||||
NSData *data = [self.pubKeys.dsaPubKey dataUsingEncoding:NSASCIIStringEncoding];
|
||||
if (!self || !data.length) {
|
||||
SULog(SULogLevelError, @"Could not read public DSA key");
|
||||
return nil;
|
||||
@@ -67,40 +70,84 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
SecKeyRef dsaPubKeySecKey = nil;
|
||||
if (format == kSecFormatOpenSSL && itemType == kSecItemTypePublicKey && CFArrayGetCount(items) == 1) {
|
||||
// Seems silly, but we can't quiet the warning about dropping CFTypeRef's const qualifier through
|
||||
// any manner of casting I've tried, including interim explicit cast to void*. The -Wcast-qual
|
||||
// warning is on by default with -Weverything and apparently became more noisy as of Xcode 7.
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wcast-qual"
|
||||
_secKey = (SecKeyRef)CFRetain(CFArrayGetValueAtIndex(items, 0));
|
||||
dsaPubKeySecKey = (SecKeyRef)CFRetain(CFArrayGetValueAtIndex(items, 0));
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
CFRelease(items);
|
||||
|
||||
return self;
|
||||
return dsaPubKeySecKey;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
- (BOOL)verifyFileAtPath:(NSString *)path signatures:(SUSignatures *)signatures
|
||||
{
|
||||
if (_secKey) {
|
||||
CFRelease(_secKey);
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)verifyFileAtPath:(NSString *)path signature:(NSData *)signature
|
||||
{
|
||||
if (!path.length) {
|
||||
if (!path || !path.length) {
|
||||
return NO;
|
||||
}
|
||||
NSInputStream *dataInputStream = [NSInputStream inputStreamWithFileAtPath:path];
|
||||
return [self verifyStream:dataInputStream signature:signature];
|
||||
|
||||
if (!signatures) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSData *dsaSignature = signatures.dsaSignature;
|
||||
NSString *dsaPubKey = self.pubKeys.dsaPubKey;
|
||||
|
||||
const unsigned char *edSignature = signatures.ed25519Signature;
|
||||
const unsigned char *edPubKey = self.pubKeys.ed25519PubKey;
|
||||
|
||||
if (edPubKey && !edSignature) {
|
||||
SULog(SULogLevelDefault, @"There is no EdDSA signature in the update, but the app is capable of verifying them");
|
||||
} if (!edPubKey && edSignature) {
|
||||
SULog(SULogLevelDefault, @"The update has an EdDSA signature, but it won't be used, because the old app doesn't have an EdDSA public key");
|
||||
} else if (edPubKey && edSignature) {
|
||||
NSError *error = nil;
|
||||
NSData *data = [NSData dataWithContentsOfFile:path options:NSDataReadingMappedAlways error:&error];
|
||||
if (!data || !data.length) {
|
||||
SULog(SULogLevelError, @"Failed to load file %@: %@", path, error);
|
||||
return NO;
|
||||
}
|
||||
if (ed25519_verify(edSignature, data.bytes, data.length, edPubKey)) {
|
||||
SULog(SULogLevelDefault, @"OK: EdDSA signature is correct");
|
||||
if (!dsaPubKey) {
|
||||
return YES;
|
||||
} else {
|
||||
SULog(SULogLevelDefault, @"This app has a DSA public key, so a DSA signature is required too");
|
||||
}
|
||||
} else {
|
||||
SULog(SULogLevelError, @"EdDSA signature does not match. Data of the update file being checked is different than data that has been signed, or the public key and the private key are not from the same set.");
|
||||
if (dsaSignature) {
|
||||
SULog(SULogLevelDefault, @"DSA signature won't be checked, because EdDSA verification has already failed");
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
if (!dsaSignature) {
|
||||
SULog(SULogLevelError, @"There is no DSA signature in the update");
|
||||
} else if (!dsaPubKey) {
|
||||
SULog(SULogLevelDefault, @"The update has a DSA signature, but it can't be used, because the old app doesn't have a DSA public key");
|
||||
} else {
|
||||
NSInputStream *dataInputStream = [NSInputStream inputStreamWithFileAtPath:path];
|
||||
return [self verifyDSASignatureOfStream:dataInputStream dsaSignature:dsaSignature];
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)verifyStream:(NSInputStream *)stream signature:(NSData *)signature
|
||||
- (BOOL)verifyDSASignatureOfStream:(NSInputStream *)stream dsaSignature:(NSData *)dsaSignature
|
||||
{
|
||||
if (!stream || !signature) {
|
||||
if (!stream || !dsaSignature) {
|
||||
SULog(SULogLevelError, @"Invalid arguments to verifyStream");
|
||||
return NO;
|
||||
}
|
||||
|
||||
SecKeyRef dsaPubKeySecKey = [self dsaSecKeyRef];
|
||||
if (!dsaPubKeySecKey) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
@@ -116,6 +163,7 @@
|
||||
if (dataDigestTransform) CFRelease(dataDigestTransform);
|
||||
if (dataVerifyTransform) CFRelease(dataVerifyTransform);
|
||||
if (error) CFRelease(error);
|
||||
if (dsaPubKeySecKey) CFRelease(dsaPubKeySecKey);
|
||||
return NO;
|
||||
};
|
||||
|
||||
@@ -132,10 +180,10 @@
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdirect-ivar-access"
|
||||
dataVerifyTransform = SecVerifyTransformCreate(_secKey, (__bridge CFDataRef)signature, &error);
|
||||
dataVerifyTransform = SecVerifyTransformCreate(dsaPubKeySecKey, (__bridge CFDataRef)dsaSignature, &error);
|
||||
#pragma clang diagnostic pop
|
||||
if (!dataVerifyTransform || error) {
|
||||
SULog(SULogLevelError, @"Could not understand format of the signature: %@; Signature data: %@", error, signature);
|
||||
SULog(SULogLevelError, @"Could not understand format of the signature: %@; Signature data: %@", error, dsaSignature);
|
||||
return cleanup();
|
||||
}
|
||||
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// SUSignatures.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Kornel on 15/09/2018.
|
||||
// Copyright © 2018 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 1090
|
||||
@interface NSData (SUDSAVerifier)
|
||||
- (id)initWithBase64Encoding:(NSString *)base64String;
|
||||
@end
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SUSignatures : NSObject {
|
||||
unsigned char ed25519_signature[64];
|
||||
}
|
||||
@property (strong, readonly, nullable) NSData *dsaSignature;
|
||||
@property (readonly, nullable, nonatomic) const unsigned char *ed25519Signature;
|
||||
|
||||
- (instancetype)initWithDsa:(NSString * _Nullable)dsa ed:(NSString * _Nullable)ed;
|
||||
@end
|
||||
|
||||
|
||||
@interface SUPublicKeys : NSObject {
|
||||
unsigned char ed25519_public_key[32];
|
||||
}
|
||||
@property (strong, readonly, nullable) NSString *dsaPubKey;
|
||||
@property (readonly, nullable, nonatomic) const unsigned char *ed25519PubKey;
|
||||
|
||||
- (instancetype)initWithDsa:(NSString * _Nullable)dsa ed:(NSString * _Nullable)ed;
|
||||
- (BOOL) isEqualToKey:(SUPublicKeys *)key;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Vendored
+88
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// SUSignatures.m
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Kornel on 15/09/2018.
|
||||
// Copyright © 2018 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SUSignatures.h"
|
||||
#import <assert.h>
|
||||
#import "SULog.h"
|
||||
|
||||
@implementation SUSignatures
|
||||
@synthesize dsaSignature = _dsaSignature;
|
||||
|
||||
static NSData *decode(NSString *str) {
|
||||
if (str == nil) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSString *stripped = [str stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];
|
||||
return [[NSData alloc] initWithBase64Encoding:stripped];
|
||||
}
|
||||
|
||||
- (instancetype)initWithDsa:(NSString * _Nullable)maybeDsa ed:(NSString * _Nullable)maybeEd25519
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
if (maybeDsa != nil) {
|
||||
_dsaSignature = decode(maybeDsa);
|
||||
}
|
||||
if (maybeEd25519 != nil) {
|
||||
NSData *data = decode(maybeEd25519);
|
||||
assert(64 == sizeof(self->ed25519_signature));
|
||||
[data getBytes:self->ed25519_signature length:sizeof(self->ed25519_signature)];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (const unsigned char *)ed25519Signature {
|
||||
for(size_t i=0; i < sizeof(self->ed25519_signature); i++) {
|
||||
if (self->ed25519_signature[i] != 0) {
|
||||
return self->ed25519_signature;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation SUPublicKeys
|
||||
@synthesize dsaPubKey = _dsaPubKey;
|
||||
|
||||
- (instancetype)initWithDsa:(NSString * _Nullable)maybeDsa ed:(NSString * _Nullable)maybeEd25519
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_dsaPubKey = maybeDsa;
|
||||
if (maybeEd25519 != nil) {
|
||||
NSData *ed = decode(maybeEd25519);
|
||||
assert(32 == sizeof(self->ed25519_public_key));
|
||||
[ed getBytes:self->ed25519_public_key length:sizeof(self->ed25519_public_key)];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL) isEqualToKey:(SUPublicKeys *)key {
|
||||
NSString *thisKey = self.dsaPubKey;
|
||||
NSString *thatKey = key.dsaPubKey;
|
||||
if (thisKey == nil || thatKey == nil) {
|
||||
return NO;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
- (const unsigned char *)ed25519PubKey {
|
||||
for(size_t i=0; i < sizeof(self->ed25519_public_key); i++) {
|
||||
if (self->ed25519_public_key[i] != 0) {
|
||||
return self->ed25519_public_key;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@end
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+ (BOOL)canUnarchivePath:(NSString *)path;
|
||||
|
||||
+ (BOOL)unsafeIfArchiveIsNotValidated;
|
||||
+ (BOOL)mustValidateBeforeExtraction;
|
||||
|
||||
- (void)unarchiveWithCompletionBlock:(void (^)(NSError * _Nullable))completionBlock progressBlock:(void (^ _Nullable)(double))progressBlock;
|
||||
|
||||
|
||||
Vendored
+4
-5
@@ -9,16 +9,15 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class SUHost;
|
||||
@class SUSignatures;
|
||||
|
||||
@interface SUUpdateValidator : NSObject
|
||||
|
||||
// Pass YES to performingPrevalidation if archive validation must be done immediately, before extraction
|
||||
- (instancetype)initWithDownloadPath:(NSString *)downloadPath dsaSignature:(NSString *)dsaSignature host:(SUHost *)host performingPrevalidation:(BOOL)performingPrevalidation;
|
||||
- (instancetype)initWithDownloadPath:(NSString *)downloadPath signatures:(SUSignatures *)signatures host:(SUHost *)host;
|
||||
|
||||
// Indicates whether we can perform (post) validation later
|
||||
@property (nonatomic, readonly) BOOL canValidate;
|
||||
// This is "pre" validation, before the archive has been extracted
|
||||
- (BOOL)validateDownloadPath;
|
||||
|
||||
// precondition: validation must be possible (see -canValidate)
|
||||
// This is "post" validation, after an archive has been extracted
|
||||
- (BOOL)validateWithUpdateDirectory:(NSString *)updateDirectory;
|
||||
|
||||
|
||||
Vendored
+99
-77
@@ -7,20 +7,21 @@
|
||||
//
|
||||
|
||||
#import "SUUpdateValidator.h"
|
||||
#import "SUDSAVerifier.h"
|
||||
#import "SUSignatureVerifier.h"
|
||||
#import "SUCodeSigningVerifier.h"
|
||||
#import "SUInstaller.h"
|
||||
#import "SUHost.h"
|
||||
#import "SULog.h"
|
||||
|
||||
#import "SUSignatures.h"
|
||||
|
||||
#include "AppKitPrevention.h"
|
||||
|
||||
@interface SUUpdateValidator ()
|
||||
|
||||
@property (nonatomic, readonly) SUHost *host;
|
||||
@property (nonatomic, readonly) BOOL prevalidatedDsaSignature;
|
||||
@property (nonatomic, readonly) NSString *dsaSignature;
|
||||
@property (nonatomic) BOOL prevalidatedSignature;
|
||||
@property (nonatomic) BOOL downloadPrevalidationFailed;
|
||||
@property (strong, nonatomic, readonly) SUSignatures *signatures;
|
||||
@property (nonatomic, readonly) NSString *downloadPath;
|
||||
|
||||
@end
|
||||
@@ -28,59 +29,52 @@
|
||||
@implementation SUUpdateValidator
|
||||
|
||||
@synthesize host = _host;
|
||||
@synthesize canValidate = _canValidate;
|
||||
@synthesize prevalidatedDsaSignature = _prevalidatedDsaSignature;
|
||||
@synthesize dsaSignature = _dsaSignature;
|
||||
@synthesize prevalidatedSignature = _prevalidatedSignature;
|
||||
@synthesize signatures = _signatures;
|
||||
@synthesize downloadPrevalidationFailed = _downloadPrevalidationFailed;
|
||||
@synthesize downloadPath = _downloadPath;
|
||||
|
||||
- (instancetype)initWithDownloadPath:(NSString *)downloadPath dsaSignature:(NSString *)dsaSignature host:(SUHost *)host performingPrevalidation:(BOOL)performingPrevalidation
|
||||
- (instancetype)initWithDownloadPath:(NSString *)downloadPath signatures:(SUSignatures *)signatures host:(SUHost *)host
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
BOOL canValidate;
|
||||
BOOL prevalidatedDsaSignature;
|
||||
if (performingPrevalidation) {
|
||||
NSString *publicDSAKey = host.publicDSAKey;
|
||||
|
||||
if (publicDSAKey == nil) {
|
||||
prevalidatedDsaSignature = NO;
|
||||
SULog(SULogLevelError, @"Failed to validate update before unarchiving because no DSA key was found");
|
||||
} else if (dsaSignature == nil) {
|
||||
prevalidatedDsaSignature = NO;
|
||||
SULog(SULogLevelError, @"Failed to validate update before unarchiving because no DSA signature was found");
|
||||
} else {
|
||||
prevalidatedDsaSignature = [SUDSAVerifier validatePath:downloadPath withEncodedDSASignature:dsaSignature withPublicDSAKey:publicDSAKey];
|
||||
if (!prevalidatedDsaSignature) {
|
||||
SULog(SULogLevelError, @"DSA signature validation before unarchiving failed for update %@", downloadPath);
|
||||
}
|
||||
}
|
||||
|
||||
canValidate = prevalidatedDsaSignature;
|
||||
} else {
|
||||
prevalidatedDsaSignature = NO;
|
||||
canValidate = YES;
|
||||
}
|
||||
|
||||
_canValidate = canValidate;
|
||||
_prevalidatedDsaSignature = prevalidatedDsaSignature;
|
||||
_downloadPath = [downloadPath copy];
|
||||
_dsaSignature = [dsaSignature copy];
|
||||
_signatures = signatures;
|
||||
_host = host;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)validateDownloadPath {
|
||||
SUPublicKeys *publicKeys = self.host.publicKeys;
|
||||
SUSignatures *signatures = self.signatures;
|
||||
|
||||
if (publicKeys.dsaPubKey == nil) {
|
||||
SULog(SULogLevelError, @"Failed to validate update before unarchiving because no DSA public key was found in the old app");
|
||||
} else if (signatures == nil || signatures.dsaSignature == nil) {
|
||||
SULog(SULogLevelError, @"Failed to validate update before unarchiving because no DSA signature was found");
|
||||
} else {
|
||||
if ([SUSignatureVerifier validatePath:self.downloadPath withSignatures:signatures withPublicKeys:publicKeys]) {
|
||||
self.prevalidatedSignature = YES;
|
||||
return YES;
|
||||
}
|
||||
SULog(SULogLevelError, @"DSA signature validation before unarchiving failed for update %@", self.downloadPath);
|
||||
}
|
||||
self.downloadPrevalidationFailed = YES;
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)validateWithUpdateDirectory:(NSString *)updateDirectory
|
||||
{
|
||||
assert(self.canValidate);
|
||||
if (self.downloadPrevalidationFailed) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSString *DSASignature = self.dsaSignature;
|
||||
NSString *publicDSAKey = self.host.publicDSAKey;
|
||||
SUSignatures *signatures = self.signatures;
|
||||
SUPublicKeys *publicKeys = self.host.publicKeys;
|
||||
NSString *downloadPath = self.downloadPath;
|
||||
SUHost *host = self.host;
|
||||
|
||||
BOOL prevalidatedDsaSignature = self.prevalidatedDsaSignature;
|
||||
|
||||
BOOL isPackage = NO;
|
||||
|
||||
// install source could point to a new bundle or a package
|
||||
@@ -92,18 +86,18 @@
|
||||
|
||||
NSURL *installSourceURL = [NSURL fileURLWithPath:installSource];
|
||||
|
||||
if (!prevalidatedDsaSignature) {
|
||||
if (!self.prevalidatedSignature) {
|
||||
// Check to see if we have a package or bundle to validate
|
||||
if (isPackage) {
|
||||
// For package type updates, all we do is check if the DSA signature is valid
|
||||
BOOL validationCheckSuccess = [SUDSAVerifier validatePath:downloadPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey];
|
||||
BOOL validationCheckSuccess = [SUSignatureVerifier validatePath:downloadPath withSignatures:signatures withPublicKeys:publicKeys];
|
||||
if (!validationCheckSuccess) {
|
||||
SULog(SULogLevelError, @"DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead.");
|
||||
}
|
||||
return validationCheckSuccess;
|
||||
} else {
|
||||
// For application bundle updates, we check both the DSA and Apple code signing signatures
|
||||
return [self validateUpdateForHost:host downloadedToPath:downloadPath newBundleURL:installSourceURL DSASignature:DSASignature];
|
||||
return [self validateUpdateForHost:host downloadedToPath:downloadPath newBundleURL:installSourceURL signatures:signatures];
|
||||
}
|
||||
} else if (isPackage) {
|
||||
// We shouldn't get here because we don't validate packages before extracting them currently
|
||||
@@ -131,7 +125,7 @@
|
||||
* * old and new Code Signing identity are the same and valid
|
||||
*
|
||||
*/
|
||||
- (BOOL)validateUpdateForHost:(SUHost *)host downloadedToPath:(NSString *)downloadedPath newBundleURL:(NSURL *)newBundleURL DSASignature:(NSString *)DSASignature
|
||||
- (BOOL)validateUpdateForHost:(SUHost *)host downloadedToPath:(NSString *)downloadedPath newBundleURL:(NSURL *)newBundleURL signatures:(SUSignatures *)signatures
|
||||
{
|
||||
NSBundle *newBundle = [NSBundle bundleWithURL:newBundleURL];
|
||||
if (newBundle == nil) {
|
||||
@@ -139,55 +133,83 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSString *publicDSAKey = host.publicDSAKey;
|
||||
SUPublicKeys *publicKeys = host.publicKeys;
|
||||
|
||||
SUHost *newHost = [[SUHost alloc] initWithBundle:newBundle];
|
||||
NSString *newPublicDSAKey = newHost.publicDSAKey;
|
||||
SUPublicKeys *newPublicKeys = newHost.publicKeys;
|
||||
BOOL oldHasLegacyDSAKey = publicKeys.dsaPubKey != nil;
|
||||
BOOL oldHasEdDSAKey = publicKeys.ed25519PubKey != nil;
|
||||
BOOL oldHasAnyDSAKey = oldHasLegacyDSAKey || oldHasEdDSAKey;
|
||||
BOOL newHasLegacyDSAKey = newPublicKeys.dsaPubKey != nil;
|
||||
BOOL newHasEdDSAKey = newPublicKeys.ed25519PubKey != nil;
|
||||
BOOL newHasAnyDSAKey = newHasLegacyDSAKey || newHasEdDSAKey;
|
||||
BOOL migratesDSAKeys = oldHasLegacyDSAKey && !oldHasEdDSAKey && newHasEdDSAKey && !newHasLegacyDSAKey;
|
||||
BOOL updateIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:newHost.bundle.bundleURL];
|
||||
BOOL hostIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:host.bundle.bundleURL];
|
||||
|
||||
// Downgrade in DSA security should not be possible
|
||||
if (publicDSAKey != nil && newPublicDSAKey == nil) {
|
||||
SULog(SULogLevelError, @"A public DSA key is found in the old bundle but no public DSA key is found in the new update. For security reasons, the update will be rejected.");
|
||||
// This is not essential for security, only a policy
|
||||
if (oldHasAnyDSAKey && !newHasAnyDSAKey) {
|
||||
SULog(SULogLevelError, @"A public (Ed)DSA key was found in the old bundle but no public (Ed)DSA key was found in the new update. Sparkle only supports rotation, but not removal of (Ed)DSA keys. Please add an EdDSA key to the new app.");
|
||||
return NO;
|
||||
}
|
||||
|
||||
BOOL dsaKeysMatch = (publicDSAKey == nil || newPublicDSAKey == nil) ? NO : [publicDSAKey isEqualToString:newPublicDSAKey];
|
||||
// Security-critical part starts here
|
||||
BOOL passedDSACheck = NO;
|
||||
BOOL passedCodeSigning = NO;
|
||||
|
||||
if (oldHasAnyDSAKey) {
|
||||
// it's critical to check against the old public key, rather than the new key
|
||||
passedDSACheck = [SUSignatureVerifier validatePath:downloadedPath withSignatures:signatures withPublicKeys:publicKeys];
|
||||
}
|
||||
|
||||
if (hostIsCodeSigned) {
|
||||
NSError *error = nil;
|
||||
passedCodeSigning = [SUCodeSigningVerifier codeSignatureAtBundleURL:host.bundle.bundleURL matchesSignatureAtBundleURL:newHost.bundle.bundleURL error:&error];
|
||||
}
|
||||
// End of security-critical part
|
||||
|
||||
// If the new DSA key differs from the old, then this check is not a security measure, because the new key is not trusted.
|
||||
// In that case, the check ensures that the app author has correctly used DSA keys, so that the app will be updateable in the next version.
|
||||
// However if the new and old DSA keys are the same, then this is a security measure.
|
||||
if (newPublicDSAKey != nil) {
|
||||
if (![SUDSAVerifier validatePath:downloadedPath withEncodedDSASignature:DSASignature withPublicDSAKey:newPublicDSAKey]) {
|
||||
SULog(SULogLevelError, @"DSA signature validation failed. The update has a public DSA key and is signed with a DSA key, but the %@ doesn't match the signature. The update will be rejected.",
|
||||
dsaKeysMatch ? @"public key" : @"new public key shipped with the update");
|
||||
if (!passedDSACheck && newHasAnyDSAKey) {
|
||||
if (![SUSignatureVerifier validatePath:downloadedPath withSignatures:signatures withPublicKeys:newPublicKeys]) {
|
||||
SULog(SULogLevelError, @"The update has a public (Ed)DSA key, but the public key shipped with the update doesn't match the signature. To prevent future problems, the update will be rejected.");
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
BOOL updateIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:newHost.bundle.bundleURL];
|
||||
|
||||
if (dsaKeysMatch) {
|
||||
NSError *error = nil;
|
||||
if (updateIsCodeSigned && ![SUCodeSigningVerifier codeSignatureIsValidAtBundleURL:newHost.bundle.bundleURL error:&error]) {
|
||||
SULog(SULogLevelError, @"The update archive has a valid DSA signature, but the app is also signed with Code Signing, which is corrupted: %@. The update will be rejected.", error);
|
||||
return NO;
|
||||
}
|
||||
NSError *error = nil;
|
||||
if (passedDSACheck && updateIsCodeSigned && ![SUCodeSigningVerifier codeSignatureIsValidAtBundleURL:newHost.bundle.bundleURL error:&error]) {
|
||||
SULog(SULogLevelError, @"The update archive has a valid (Ed)DSA signature, but the app is also signed with Code Signing, which is corrupted: %@. The update will be rejected.", error);
|
||||
return NO;
|
||||
}
|
||||
|
||||
// Either DSA must be valid, or Apple Code Signing must be valid.
|
||||
// We allow failure of one of them, because this allows key rotation without breaking chain of trust.
|
||||
if (passedDSACheck || passedCodeSigning) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
// Now this just explains the failure
|
||||
|
||||
NSString *dsaStatus;
|
||||
if (migratesDSAKeys) {
|
||||
dsaStatus = @"migrates to new EdDSA keys without keeping the old DSA key for transition";
|
||||
} else if (newHasAnyDSAKey) {
|
||||
dsaStatus = @"has a new (Ed)DSA key that doesn't match the previous one";
|
||||
} else if (oldHasAnyDSAKey) {
|
||||
dsaStatus = @"removes the (Ed)DSA key";
|
||||
} else {
|
||||
BOOL hostIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:host.bundle.bundleURL];
|
||||
|
||||
NSString *dsaStatus = newPublicDSAKey ? @"has a new DSA key that doesn't match the previous one" : (publicDSAKey ? @"removes the DSA key" : @"isn't signed with a DSA key");
|
||||
if (!hostIsCodeSigned || !updateIsCodeSigned) {
|
||||
NSString *acsStatus = !hostIsCodeSigned ? @"old app hasn't been signed with app Code Signing" : @"new app isn't signed with app Code Signing";
|
||||
SULog(SULogLevelError, @"The update archive %@, and the %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, acsStatus);
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSError *error = nil;
|
||||
if (![SUCodeSigningVerifier codeSignatureAtBundleURL:host.bundle.bundleURL matchesSignatureAtBundleURL:newHost.bundle.bundleURL error:&error]) {
|
||||
SULog(SULogLevelError, @"The update archive %@, and the app is signed with a new Code Signing identity that doesn't match code signing of the original app: %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, error);
|
||||
return NO;
|
||||
}
|
||||
dsaStatus = @"isn't signed with an EdDSA key";
|
||||
}
|
||||
|
||||
return YES;
|
||||
if (!hostIsCodeSigned || !updateIsCodeSigned) {
|
||||
NSString *acsStatus = !hostIsCodeSigned ? @"old app hasn't been signed with app Code Signing" : @"new app isn't signed with app Code Signing";
|
||||
SULog(SULogLevelError, @"The update archive %@, and the %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, acsStatus);
|
||||
} else {
|
||||
SULog(SULogLevelError, @"The update archive %@, and the app is signed with a new Code Signing identity that doesn't match code signing of the original app: %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, error);
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
Vendored
+12
-18
@@ -25,6 +25,7 @@
|
||||
#include <SystemConfiguration/SystemConfiguration.h>
|
||||
#import "SUSystemProfiler.h"
|
||||
#import "SUSystemUpdateInfo.h"
|
||||
#import "SUSignatures.h"
|
||||
|
||||
NSString *const SUUpdaterDidFinishLoadingAppCastNotification = @"SUUpdaterDidFinishLoadingAppCastNotification";
|
||||
NSString *const SUUpdaterDidFindValidUpdateNotification = @"SUUpdaterDidFindValidUpdateNotification";
|
||||
@@ -138,30 +139,23 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
||||
}
|
||||
|
||||
-(void)checkIfConfiguredProperly {
|
||||
BOOL hasPublicDSAKey = [self.host publicDSAKey] != nil;
|
||||
BOOL hasPublicKey = self.host.publicKeys.dsaPubKey != nil || self.host.publicKeys.ed25519PubKey != nil;
|
||||
BOOL isMainBundle = [self.host.bundle isEqualTo:[NSBundle mainBundle]];
|
||||
BOOL hostIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:self.host.bundle.bundleURL];
|
||||
NSURL *feedURL = [self feedURL];
|
||||
BOOL servingOverHttps = [[[feedURL scheme] lowercaseString] isEqualToString:@"https"];
|
||||
|
||||
if (!hasPublicDSAKey) {
|
||||
// If we failed to retrieve a DSA key but the bundle specifies a path to one, we should consider this a configuration failure
|
||||
NSString *publicDSAKeyFileKey = [self.host publicDSAKeyFileKey];
|
||||
if (publicDSAKeyFileKey != nil) {
|
||||
[self showAlertText:SULocalizedString(@"Insecure update error!", nil)
|
||||
informativeText:[NSString stringWithFormat:SULocalizedString(@"For security reasons, the file (%@) indicated by the '%@' key needs to exist in the bundle's Resources.", nil), publicDSAKeyFileKey, SUPublicDSAKeyFileKey]];
|
||||
if (!hasPublicKey) {
|
||||
if (!isMainBundle) {
|
||||
[self showAlertText:SULocalizedString(@"Auto-update not configured", nil)
|
||||
informativeText:SULocalizedString(@"For security reasons, you need to sign your updates with a EdDSA key. See Sparkle's documentation for more information.", nil)];
|
||||
} else {
|
||||
if (!isMainBundle) {
|
||||
[self showAlertText:SULocalizedString(@"Insecure update error!", nil)
|
||||
informativeText:SULocalizedString(@"For security reasons, you need to sign your updates with a DSA key. See Sparkle's documentation for more information.", nil)];
|
||||
} else {
|
||||
if (!hostIsCodeSigned) {
|
||||
[self showAlertText:SULocalizedString(@"Insecure update error!", nil)
|
||||
informativeText:SULocalizedString(@"For security reasons, you need to code sign your application or sign your updates with a DSA key. See https://sparkle-project.org/documentation/ for more information.", nil)];
|
||||
} else if (!servingOverHttps) {
|
||||
[self showAlertText:SULocalizedString(@"Insecure update error!", nil)
|
||||
informativeText:SULocalizedString(@"For security reasons, you need to serve your updates over HTTPS and/or sign your updates with a DSA key. See https://sparkle-project.org/documentation/ for more information.", nil)];
|
||||
}
|
||||
if (!hostIsCodeSigned) {
|
||||
[self showAlertText:SULocalizedString(@"Auto-update not configured", nil)
|
||||
informativeText:SULocalizedString(@"For security reasons, you need to code sign your application or sign your updates with a EdDSA key. See https://sparkle-project.org/documentation/ for more information.", nil)];
|
||||
} else if (!servingOverHttps) {
|
||||
[self showAlertText:SULocalizedString(@"Auto-update not configured", nil)
|
||||
informativeText:SULocalizedString(@"For security reasons, you need to serve your updates over HTTPS and/or sign your updates with a EdDSA key. See https://sparkle-project.org/documentation/ for more information.", nil)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+5
-3
@@ -16,11 +16,13 @@
|
||||
|
||||
"A new version of %@ is available!" = "גרסה חדשה של %@ זמינה!";
|
||||
|
||||
"An error occurred during installation. Please try again later." = "שגיאה בהתקנה. אנא נסה שנית במועד מרוחר יותר.";
|
||||
"Cancel Update" = "בטל עדכון";
|
||||
|
||||
"An error occurred in retrieving update information. Please try again later." = "שגיאה בקבלת מידע על עדכונים. אנא נסה שנית במועד מרוחר יותר.";
|
||||
"An error occurred during installation. Please try again later." = "שגיאה בהתקנה. אנא נסה שנית במועד מאוחר יותר.";
|
||||
|
||||
"An error occurred while extracting the archive. Please try again later." = "שגיאה בפתיחת הקובת המקווץ. אנא נסה שנית במועד מרוחר יותר.";
|
||||
"An error occurred in retrieving update information. Please try again later." = "שגיאה בקבלת מידע על עדכונים. אנא נסה שנית במועד מאוחר יותר.";
|
||||
|
||||
"An error occurred while extracting the archive. Please try again later." = "שגיאה בפתיחת הקובת המקווץ. אנא נסה שנית במועד מאוחר יותר.";
|
||||
|
||||
"An error occurred while trying to download the file. Please try again later." = "שגיאה בהורדת הקובץ. אנא נסה שנית במועד מאוחר יותר.";
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#import "SUUpdateSettingsWindowController.h"
|
||||
#import "SUFileManager.h"
|
||||
#import "SUTestWebServer.h"
|
||||
#import "../ed25519/src/ed25519.h" // run `git submodule update --init` if you get an erorr here
|
||||
|
||||
@interface SUTestApplicationDelegate ()
|
||||
|
||||
@@ -117,32 +118,18 @@ static NSString * const UPDATED_VERSION = @"2.0";
|
||||
|
||||
// Don't ever do this at home, kids (seriously)
|
||||
// (that is, including the private key inside of your application)
|
||||
NSString *privateKeyPath = [mainBundle pathForResource:@"test_app_only_dsa_priv_dont_ever_do_this_for_real" ofType:@"pem"];
|
||||
assert(privateKeyPath != nil);
|
||||
|
||||
// Sign our update
|
||||
NSTask *signUpdateTask = [[NSTask alloc] init];
|
||||
NSString *signUpdatePath = [mainBundle pathForResource:@"sign_update" ofType:@""];
|
||||
assert(signUpdatePath != nil);
|
||||
signUpdateTask.launchPath = signUpdatePath;
|
||||
const unsigned char self_sign_demo_only_insecure_hack[64] = {200, 238, 135, 84, 10, 189, 3, 193, 61, 208, 203, 30, 133, 47, 12, 22, 19, 52, 252, 99, 110, 205, 209, 94, 215, 144, 201, 70, 27, 162, 163, 108, 0, 164, 68, 184, 226, 93, 121, 199, 172, 17, 26, 64, 89, 68, 232, 41, 2, 26, 245, 175, 158, 165, 42, 55, 5, 97, 8, 243, 251, 164, 93, 9};
|
||||
// in normal app this goes to Info.plist
|
||||
const unsigned char public_key[32] = {121, 17, 79, 45, 155, 141, 51, 169, 188, 110, 91, 102, 182, 147, 215, 225, 252, 202, 110, 231, 200, 215, 62, 171, 40, 145, 237, 128, 130, 44, 150, 89};
|
||||
unsigned char signature[64];
|
||||
|
||||
NSURL *archiveURL = [serverDirectoryURL URLByAppendingPathComponent:zipName];
|
||||
NSString *path = archiveURL.path;
|
||||
assert(path != nil);
|
||||
signUpdateTask.arguments = @[path, privateKeyPath];
|
||||
NSData *archive = [NSData dataWithContentsOfURL:archiveURL];
|
||||
assert(archive != nil);
|
||||
|
||||
NSPipe *outputPipe = [NSPipe pipe];
|
||||
signUpdateTask.standardOutput = outputPipe;
|
||||
ed25519_sign(signature, archive.bytes, archive.length, public_key, self_sign_demo_only_insecure_hack);
|
||||
|
||||
[signUpdateTask launch];
|
||||
[signUpdateTask waitUntilExit];
|
||||
|
||||
assert(signUpdateTask.terminationStatus == 0);
|
||||
|
||||
NSData *signatureData = [outputPipe.fileHandleForReading readDataToEndOfFile];
|
||||
NSString *signature = [[[NSString alloc] initWithData:signatureData encoding:NSUTF8StringEncoding] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
|
||||
assert(signature != nil);
|
||||
NSString *signatureString = [[NSData dataWithBytes:signature length:64] base64Encoding];
|
||||
|
||||
// Obtain the file attributes to get the file size of our update later
|
||||
NSError *fileAttributesError = nil;
|
||||
@@ -179,7 +166,7 @@ static NSString * const UPDATED_VERSION = @"2.0";
|
||||
NSUInteger numberOfLengthReplacements = [appcastContents replaceOccurrencesOfString:@"$INSERT_ARCHIVE_LENGTH" withString:[NSString stringWithFormat:@"%llu", archiveFileAttributes.fileSize] options:NSLiteralSearch range:NSMakeRange(0, appcastContents.length)];
|
||||
assert(numberOfLengthReplacements == 1);
|
||||
|
||||
NSUInteger numberOfSignatureReplacements = [appcastContents replaceOccurrencesOfString:@"$INSERT_DSA_SIGNATURE" withString:signature options:NSLiteralSearch range:NSMakeRange(0, appcastContents.length)];
|
||||
NSUInteger numberOfSignatureReplacements = [appcastContents replaceOccurrencesOfString:@"$INSERT_EDDSA_SIGNATURE" withString:signatureString options:NSLiteralSearch range:NSMakeRange(0, appcastContents.length)];
|
||||
assert(numberOfSignatureReplacements == 1);
|
||||
|
||||
NSError *writeAppcastError = nil;
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.5</string>
|
||||
<string>1.5.1</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.5</string>
|
||||
<string>1.5.1</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
@@ -28,8 +28,8 @@
|
||||
<true/>
|
||||
<key>SUFeedURL</key>
|
||||
<string>http://localhost:1337/sparkletestcast.xml</string>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
<string>test_app_only_dsa_pub.pem</string>
|
||||
<key>SUPublicEDKey</key>
|
||||
<string>eRFPLZuNM6m8bltmtpPX4fzKbufI1z6rKJHtgIIsllk=</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
]]>
|
||||
</description>
|
||||
<pubDate>Sat, 26 Jul 2014 15:20:11 +0000</pubDate>
|
||||
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" sparkle:version="2.0" length="$INSERT_ARCHIVE_LENGTH" type="application/octet-stream" sparkle:dsaSignature="$INSERT_DSA_SIGNATURE" />
|
||||
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" sparkle:version="2.0" length="$INSERT_ARCHIVE_LENGTH" type="application/octet-stream" sparkle:edSignature="$INSERT_EDDSA_SIGNATURE" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -1,36 +0,0 @@
|
||||
-----BEGIN DSA PRIVATE KEY-----
|
||||
MIIGPgIBAAKCAgEAvvs5v/Vbc6gYls5WnHUmWy9rhUsuAvf+HAuz9Tzp63fb8Cni
|
||||
8aqe+qkiL3RKuabl92BAK7Vwv4EMOXozDlNPWZS5EZUBZuiQ7vtQC9Eg3C68KWwb
|
||||
lrhSwzyVnXz8twD75CiR+oPSZEIiOQ81Ok///i1+TV17ierbLxYJ2Sd1wTRQdLeS
|
||||
7rmnL6aLka0PNtsFvFlvW9GbrlNP9PZaGmrJYadsTV5+F9XZRFnwZc6crmrIo+DA
|
||||
VNucgqBdZUNN0CWz9OJfKr/GKMw+blTF2WixDnGH2FKtNh7QSuRwlvioXBjYJbX4
|
||||
UV6jJqxZdLUMSm9iZteC8Q34cFVwrPizwRBO/8Yx/htFPrvyIkD0uvfMO55dbkld
|
||||
0nWfbHcUJRHjSEOPahOlHHGejmLWEsBtp9vD453czFXi19GhR98gEaXmcbwOr4gH
|
||||
A1WHTqOwUx6Ll+AFWG5nyZIKB9SxMUBWu0znVg9d9wqYAL0/aBWhXEFe86xYdReK
|
||||
z0RvnTRyVDbIGhMrRMviyaiTGHBbJVC62Appp/fl8o0HFSKJfTwhRSfmLupqt0XE
|
||||
C1GTbSZ9l04fsryY/dyyuO+E3e/+Q1jxyqrdJI9mhkUY2w4FWmaovScWNbekwhXb
|
||||
qy6+bsY2ZyuNGjR/S0xFyHw95l5VGiHeyXD+bWg9lYQzIULjX3zTAU6FFYMCFQCu
|
||||
tNIHrUBezHQxUxsQDgGubSZ90wKCAgAKHL/AbnSnGcoDNw2tDTrfYvQQH1CN8/yx
|
||||
0X1ryUwzn9BJYCzl6NTaHZx/LSwhSasNRmiSlp95YqhLa31xJDPaHVZH8SDLyCSn
|
||||
rBWCrKaKT8U3PKl71WUnxttYIyMTyNYh6ef+OP1uxDnOn0asWYinbDEM5E6CrRmW
|
||||
AoKx0yDgchiyOMGiwCuTN1Z7fx0AL8Y+JZ1ulOJjwd+qBaPIT/tduz5fKzEvfpHy
|
||||
6seOaRAuj/CNx1svSiCi16nlHZjlFlbzE5+IlX5iOvSEroacGbj7FHmHlRTpdgBo
|
||||
Ez6uzSV3drPDmsH9jb0nvhy/MAkBrHVOm4jj77613nD/QlO3Ilrox5+O1LuYrU6c
|
||||
gy5ZEek093QUsazHonjZc+btYIshs4FTWG9gBbZRQbJy0cOlNei0XcwIHOWqJXOJ
|
||||
LWpV1ZXu2IxLhfbg4Nt02z1CNHTm+VKD8UPyUCk8Mf9SuPUzRXeWMiLE57+8hsUs
|
||||
BcMvvURRgHZqVaNdO5ktb+i/g0zhEIFaOyfCAwZKNzLyz/JuwosbOruLMW0YCnaO
|
||||
mj9YvO0MQ+zHcd806n/9t8sig69zU/4wg9lxJrgWvf3LbjwBii143nDcSu3DGaZj
|
||||
Ti9ZAj19AbUX3PB44m9TDxFwTDTFI+xp8HSVtlWx1Pt2KXbsxD5mP1LEpHpq1GOB
|
||||
7zLcRL1F1wKCAgEAlikrAItC1I6mHKst1GQLDr9c07OuIJA+GJIJB6Iq/K/CjdUA
|
||||
Rjv/3L6l4pP33VAZySh6jqMe3Qm9W0ZZ687YSuVWRCsl2yKWAWuqXm8zaEijaHZR
|
||||
Sa6tygj9EUMZ2zbJEOPihIdWB+fHcwd01KAqUzYZEWZvw7fLZNE2QM0emQai3U1V
|
||||
3SXYney1qXW9lJ38EjB4LrYzcDFZaNKXidvXo3nI66M1MgI9lAltmRLGAOJmV6bL
|
||||
KvJEFVpSux5cubXISPQBlAw9Zb15UPc3IAe82jX7ccsI8RHe5xeIepZ0c7xnk+J8
|
||||
sFrgBrlN1swki2WfGavQOsV9kZg79rYCB3fOtxRsCBcQOasL295YWtQh5g/dCQWA
|
||||
JMx+6SVMWwr//0YSu361zJakdFz/vssVVGkaun0bM2YTOYP1ZZp6LyHwIrWEqh9m
|
||||
d2v2NAX1h4LktrJ8OHgBV/z6/YzFOlsa424Dvl1jnUozK1RDX5/z2FnX1J22hNSY
|
||||
fx2M8wTD09+xwJyFOzT8g/pjkKvYMgvnWVjvONwvM5nc2OFzuHl9JVvdF5LbSYPO
|
||||
M/KkRrtg+denjT4/fwp16gGcCsIf+RbEDN1F9rWg5hNPKteVkrMl6suuZZOu7H7E
|
||||
uZIiEcW3bxXYiN8LLXwS4G6VH+9fsUmSusJZKxhBuRThzehy0n6lfgSRRGICFBi3
|
||||
z3tWjm2F6noctsjrVH5d0jRZ
|
||||
-----END DSA PRIVATE KEY-----
|
||||
@@ -1,36 +0,0 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIIGOzCCBC0GByqGSM44BAEwggQgAoICAQC++zm/9VtzqBiWzlacdSZbL2uFSy4C
|
||||
9/4cC7P1POnrd9vwKeLxqp76qSIvdEq5puX3YEArtXC/gQw5ejMOU09ZlLkRlQFm
|
||||
6JDu+1AL0SDcLrwpbBuWuFLDPJWdfPy3APvkKJH6g9JkQiI5DzU6T//+LX5NXXuJ
|
||||
6tsvFgnZJ3XBNFB0t5LuuacvpouRrQ822wW8WW9b0ZuuU0/09loaaslhp2xNXn4X
|
||||
1dlEWfBlzpyuasij4MBU25yCoF1lQ03QJbP04l8qv8YozD5uVMXZaLEOcYfYUq02
|
||||
HtBK5HCW+KhcGNgltfhRXqMmrFl0tQxKb2Jm14LxDfhwVXCs+LPBEE7/xjH+G0U+
|
||||
u/IiQPS698w7nl1uSV3SdZ9sdxQlEeNIQ49qE6UccZ6OYtYSwG2n28PjndzMVeLX
|
||||
0aFH3yARpeZxvA6viAcDVYdOo7BTHouX4AVYbmfJkgoH1LExQFa7TOdWD133CpgA
|
||||
vT9oFaFcQV7zrFh1F4rPRG+dNHJUNsgaEytEy+LJqJMYcFslULrYCmmn9+XyjQcV
|
||||
Iol9PCFFJ+Yu6mq3RcQLUZNtJn2XTh+yvJj93LK474Td7/5DWPHKqt0kj2aGRRjb
|
||||
DgVaZqi9JxY1t6TCFdurLr5uxjZnK40aNH9LTEXIfD3mXlUaId7JcP5taD2VhDMh
|
||||
QuNffNMBToUVgwIVAK600getQF7MdDFTGxAOAa5tJn3TAoICAAocv8BudKcZygM3
|
||||
Da0NOt9i9BAfUI3z/LHRfWvJTDOf0ElgLOXo1NodnH8tLCFJqw1GaJKWn3liqEtr
|
||||
fXEkM9odVkfxIMvIJKesFYKspopPxTc8qXvVZSfG21gjIxPI1iHp5/44/W7EOc6f
|
||||
RqxZiKdsMQzkToKtGZYCgrHTIOByGLI4waLAK5M3Vnt/HQAvxj4lnW6U4mPB36oF
|
||||
o8hP+127Pl8rMS9+kfLqx45pEC6P8I3HWy9KIKLXqeUdmOUWVvMTn4iVfmI69ISu
|
||||
hpwZuPsUeYeVFOl2AGgTPq7NJXd2s8Oawf2NvSe+HL8wCQGsdU6biOPvvrXecP9C
|
||||
U7ciWujHn47Uu5itTpyDLlkR6TT3dBSxrMeieNlz5u1giyGzgVNYb2AFtlFBsnLR
|
||||
w6U16LRdzAgc5aolc4ktalXVle7YjEuF9uDg23TbPUI0dOb5UoPxQ/JQKTwx/1K4
|
||||
9TNFd5YyIsTnv7yGxSwFwy+9RFGAdmpVo107mS1v6L+DTOEQgVo7J8IDBko3MvLP
|
||||
8m7Cixs6u4sxbRgKdo6aP1i87QxD7Mdx3zTqf/23yyKDr3NT/jCD2XEmuBa9/ctu
|
||||
PAGKLXjecNxK7cMZpmNOL1kCPX0BtRfc8Hjib1MPEXBMNMUj7GnwdJW2VbHU+3Yp
|
||||
duzEPmY/UsSkemrUY4HvMtxEvUXXA4ICBgACggIBAJYpKwCLQtSOphyrLdRkCw6/
|
||||
XNOzriCQPhiSCQeiKvyvwo3VAEY7/9y+peKT991QGckoeo6jHt0JvVtGWevO2Erl
|
||||
VkQrJdsilgFrql5vM2hIo2h2UUmurcoI/RFDGds2yRDj4oSHVgfnx3MHdNSgKlM2
|
||||
GRFmb8O3y2TRNkDNHpkGot1NVd0l2J3stal1vZSd/BIweC62M3AxWWjSl4nb16N5
|
||||
yOujNTICPZQJbZkSxgDiZlemyyryRBVaUrseXLm1yEj0AZQMPWW9eVD3NyAHvNo1
|
||||
+3HLCPER3ucXiHqWdHO8Z5PifLBa4Aa5TdbMJItlnxmr0DrFfZGYO/a2Agd3zrcU
|
||||
bAgXEDmrC9veWFrUIeYP3QkFgCTMfuklTFsK//9GErt+tcyWpHRc/77LFVRpGrp9
|
||||
GzNmEzmD9WWaei8h8CK1hKofZndr9jQF9YeC5LayfDh4AVf8+v2MxTpbGuNuA75d
|
||||
Y51KMytUQ1+f89hZ19SdtoTUmH8djPMEw9PfscCchTs0/IP6Y5Cr2DIL51lY7zjc
|
||||
LzOZ3Njhc7h5fSVb3ReS20mDzjPypEa7YPnXp40+P38KdeoBnArCH/kWxAzdRfa1
|
||||
oOYTTyrXlZKzJerLrmWTrux+xLmSIhHFt28V2IjfCy18EuBulR/vX7FJkrrCWSsY
|
||||
QbkU4c3octJ+pX4EkURi
|
||||
-----END PUBLIC KEY-----
|
||||
@@ -19,14 +19,14 @@
|
||||
sparkle:deltaFrom="2.0"
|
||||
length="1235"
|
||||
type="application/octet-stream"
|
||||
sparkle:dsaSignature="..." />
|
||||
sparkle:edSignature="..." />
|
||||
|
||||
<enclosure url="http://localhost:1337/3.0_from_1.0.patch"
|
||||
sparkle:version="3.0"
|
||||
sparkle:deltaFrom="1.0"
|
||||
length="1485"
|
||||
type="application/octet-stream"
|
||||
sparkle:dsaSignature="..." />
|
||||
sparkle:edSignature="..." />
|
||||
</sparkle:deltas>
|
||||
</item>
|
||||
<!-- A release testing minimumSystemVersion -->
|
||||
|
||||
@@ -251,7 +251,7 @@ typedef void (^SUDeltaHandler)(NSFileManager *fileManager, NSString *sourceDirec
|
||||
XCTFail(@"Failed setting file permissions");
|
||||
}
|
||||
|
||||
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
|
||||
XCTAssertTrue([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
+19
-12
@@ -8,7 +8,8 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "SUDSAVerifier.h"
|
||||
#import "SUSignatureVerifier.h"
|
||||
#import "SUSignatures.h"
|
||||
|
||||
@interface SUDSAVerifierTest : XCTestCase
|
||||
@property NSString *testFile, *pubKeyFile;
|
||||
@@ -27,7 +28,7 @@
|
||||
|
||||
- (void)testVerifyFileAtPath
|
||||
{
|
||||
NSData *pubKey = [NSData dataWithContentsOfFile:self.pubKeyFile];
|
||||
NSString *pubKey = [NSString stringWithContentsOfFile:self.pubKeyFile encoding:NSASCIIStringEncoding error:nil];
|
||||
XCTAssertNotNil(pubKey, @"Public key must be readable");
|
||||
|
||||
NSString *validSig = @"MCwCFCIHCIYYkfZavNzTitTW5tlRp/k5AhQ40poFytqcVhIYdCxQznaXeJPJDQ==";
|
||||
@@ -38,7 +39,7 @@
|
||||
@"Expected valid signature");
|
||||
|
||||
XCTAssertFalse([self checkFile:self.testFile
|
||||
withPubKey:[NSData dataWithBytes:"lol" length:3]
|
||||
withPubKey:@"lol"
|
||||
signature:validSig],
|
||||
@"Invalid pubkey");
|
||||
|
||||
@@ -63,23 +64,29 @@
|
||||
@"Expected invalid signature");
|
||||
}
|
||||
|
||||
- (BOOL)checkFile:(NSString *)aFile withPubKey:(NSData *)pubKey signature:(NSString *)sigString
|
||||
- (BOOL)checkFile:(NSString *)aFile withPubKey:(NSString *)pubKey signature:(NSString *)sigString
|
||||
{
|
||||
SUDSAVerifier *v = [[SUDSAVerifier alloc] initWithPublicKeyData:pubKey];
|
||||
SUPublicKeys *pubKeys = [[SUPublicKeys alloc] initWithDsa:pubKey ed:nil];
|
||||
SUSignatureVerifier *v = [[SUSignatureVerifier alloc] initWithPublicKeys:pubKeys];
|
||||
|
||||
NSData *sig = [[NSData alloc] initWithBase64EncodedString:sigString options:(NSDataBase64DecodingOptions)0];
|
||||
SUSignatures *sig = [[SUSignatures alloc] initWithDsa:sigString ed:nil];
|
||||
|
||||
return [v verifyFileAtPath:aFile signature:sig];
|
||||
return [v verifyFileAtPath:aFile signatures:sig];
|
||||
}
|
||||
|
||||
- (void)testValidatePath
|
||||
{
|
||||
NSString *pubkey = [NSString stringWithContentsOfFile:self.pubKeyFile encoding:NSASCIIStringEncoding error:nil];
|
||||
NSString *dsaStr = [NSString stringWithContentsOfFile:self.pubKeyFile encoding:NSASCIIStringEncoding error:nil];
|
||||
XCTAssertNotNil(dsaStr);
|
||||
SUPublicKeys *pubkeys = [[SUPublicKeys alloc] initWithDsa:dsaStr ed:nil];
|
||||
XCTAssertNotNil(pubkeys);
|
||||
XCTAssertNotNil(pubkeys.dsaPubKey);
|
||||
|
||||
XCTAssertTrue([SUDSAVerifier validatePath:self.testFile
|
||||
withEncodedDSASignature:@"MC0CFFMF3ha5kjvrJ9JTpTR8BenPN9QUAhUAzY06JRdtP17MJewxhK0twhvbKIE="
|
||||
withPublicDSAKey:pubkey],
|
||||
@"Expected valid signature");
|
||||
SUSignatures *sig = [[SUSignatures alloc] initWithDsa:@"MC0CFFMF3ha5kjvrJ9JTpTR8BenPN9QUAhUAzY06JRdtP17MJewxhK0twhvbKIE=" ed:nil];
|
||||
XCTAssertNotNil(sig);
|
||||
XCTAssertNotNil(sig.dsaSignature);
|
||||
|
||||
XCTAssertTrue([SUSignatureVerifier validatePath:self.testFile withSignatures:sig withPublicKeys:pubkeys], @"Expected valid signature");
|
||||
}
|
||||
|
||||
@end
|
||||
File renamed without changes.
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 update_archive_file dsa_priv.pem"
|
||||
echo "This is an old DSA signing script for deprecated DSA keys."
|
||||
echo "Do not use this for new applications."
|
||||
exit 1
|
||||
fi
|
||||
openssl=/usr/bin/openssl
|
||||
version=`$openssl version`
|
||||
if [[ $version =~ "OpenSSL 0.9" ]]; then
|
||||
# pre-10.13 system: Fall back to OpenSSL DSS1 digest because it does not like the -sha1 option
|
||||
$openssl dgst -sha1 -binary < "$1" | $openssl dgst -dss1 -sign "$2" | $openssl enc -base64
|
||||
else
|
||||
# 10.13 and later: Use LibreSSL SHA1 digest
|
||||
$openssl dgst -sha1 -binary < "$1" | $openssl dgst -sha1 -sign "$2" | $openssl enc -base64
|
||||
fi
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 update_archive private_key"
|
||||
exit 1
|
||||
fi
|
||||
openssl=/usr/bin/openssl
|
||||
$openssl dgst -sha1 -binary < "$1" | $openssl dgst -sha1 -sign "$2" | $openssl enc -base64
|
||||
Submodule
+1
Submodule ed25519 added at 7fa6712ef5.
@@ -6,3 +6,5 @@
|
||||
#import "SUUnarchiver.h"
|
||||
#import "SUBinaryDeltaUnarchiver.h"
|
||||
#import "SUBinaryDeltaCreate.h"
|
||||
#import "SUSignatures.h"
|
||||
#import "../ed25519/src/ed25519.h" // run `git submodule update --init` if you get an erorr here
|
||||
@@ -14,10 +14,11 @@ func makeError(code: SUError, _ description: String) -> NSError {
|
||||
]);
|
||||
}
|
||||
|
||||
func makeAppcast(archivesSourceDir: URL, privateKey: SecKey, verbose: Bool) throws -> [String:[ArchiveItem]] {
|
||||
func makeAppcast(archivesSourceDir: URL, keys: PrivateKeys, verbose: Bool) throws -> [String:[ArchiveItem]] {
|
||||
let cacheDir = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0].appendingPathComponent("Sparkle_generate_appcast");
|
||||
let comparator = SUStandardVersionComparator();
|
||||
|
||||
let allUpdates = (try unarchiveUpdates(archivesSourceDir: archivesSourceDir, verbose:verbose))
|
||||
let allUpdates = (try unarchiveUpdates(archivesSourceDir: archivesSourceDir, archivesDestDir: cacheDir, verbose:verbose))
|
||||
.sorted(by: {
|
||||
.orderedDescending == comparator.compareVersion($0.version, toVersion:$1.version)
|
||||
})
|
||||
@@ -33,11 +34,27 @@ func makeAppcast(archivesSourceDir: URL, privateKey: SecKey, verbose: Bool) thro
|
||||
for update in allUpdates {
|
||||
group.enter();
|
||||
DispatchQueue.global().async {
|
||||
do {
|
||||
update.dsaSignature = try dsaSignature(path: update.archivePath, privateKey: privateKey);
|
||||
} catch {
|
||||
print(update, error);
|
||||
if let privateDSAKey = keys.privateDSAKey {
|
||||
do {
|
||||
update.dsaSignature = try dsaSignature(path: update.archivePath, privateDSAKey: privateDSAKey);
|
||||
} catch {
|
||||
print(update, error);
|
||||
}
|
||||
} else if update.supportsDSA {
|
||||
print("Note: did not sign with legacy DSA \(update.archivePath.path) because private DSA key file was not specified");
|
||||
}
|
||||
if let publicEdKey = update.publicEdKey {
|
||||
if let privateEdKey = keys.privateEdKey {
|
||||
do {
|
||||
update.edSignature = try edSignature(path: update.archivePath, publicEdKey: publicEdKey, privateEdKey: privateEdKey);
|
||||
} catch {
|
||||
print(update, error);
|
||||
}
|
||||
} else {
|
||||
print("Warning: could not sign \(update.archivePath.path) due to lack of private EdDSA key");
|
||||
}
|
||||
}
|
||||
|
||||
group.leave();
|
||||
}
|
||||
|
||||
@@ -63,16 +80,29 @@ func makeAppcast(archivesSourceDir: URL, privateKey: SecKey, verbose: Bool) thro
|
||||
var numDeltas = 0;
|
||||
let appBaseName = latestItem.appPath.deletingPathExtension().lastPathComponent;
|
||||
for item in updates {
|
||||
if numDeltas > maxDeltas {
|
||||
break;
|
||||
}
|
||||
|
||||
// No downgrades
|
||||
if .orderedAscending != comparator.compareVersion(item.version, toVersion: latestItem.version) {
|
||||
continue;
|
||||
}
|
||||
// Old version will not be able to verify the new version
|
||||
if !item.supportsDSA && item.publicEdKey == nil {
|
||||
continue;
|
||||
}
|
||||
|
||||
let deltaBaseName = appBaseName + latestItem.version + "-" + item.version;
|
||||
let deltaPath = archivesSourceDir.appendingPathComponent(deltaBaseName).appendingPathExtension("delta");
|
||||
|
||||
var delta:DeltaUpdate;
|
||||
if !FileManager.default.fileExists(atPath: deltaPath.path) {
|
||||
let ignoreMarkerPath = cacheDir.appendingPathComponent(deltaPath.lastPathComponent).appendingPathExtension(".ignore");
|
||||
let fm = FileManager.default;
|
||||
if fm.fileExists(atPath: ignoreMarkerPath.path) {
|
||||
continue;
|
||||
}
|
||||
if !fm.fileExists(atPath: deltaPath.path) {
|
||||
do {
|
||||
delta = try DeltaUpdate.create(from: item, to: latestItem, archivePath: deltaPath);
|
||||
} catch {
|
||||
@@ -83,23 +113,37 @@ func makeAppcast(archivesSourceDir: URL, privateKey: SecKey, verbose: Bool) thro
|
||||
delta = DeltaUpdate(fromVersion: item.version, archivePath: deltaPath);
|
||||
}
|
||||
|
||||
// Require delta to be a bit smaller
|
||||
if delta.fileSize / 7 < latestItem.fileSize / 8 {
|
||||
numDeltas += 1;
|
||||
if numDeltas > maxDeltas {
|
||||
break;
|
||||
}
|
||||
numDeltas += 1;
|
||||
|
||||
group.enter();
|
||||
DispatchQueue.global().async {
|
||||
// Require delta to be a bit smaller
|
||||
if delta.fileSize / 7 > latestItem.fileSize / 8 {
|
||||
markDeltaAsIgnored(delta: delta, markerPath: ignoreMarkerPath)
|
||||
continue;
|
||||
}
|
||||
|
||||
group.enter();
|
||||
DispatchQueue.global().async {
|
||||
if item.supportsDSA, let privateDSAKey = keys.privateDSAKey {
|
||||
do {
|
||||
delta.dsaSignature = try dsaSignature(path: deltaPath, privateKey: privateKey);
|
||||
latestItem.deltas.append(delta);
|
||||
delta.dsaSignature = try dsaSignature(path: deltaPath, privateDSAKey: privateDSAKey);
|
||||
} catch {
|
||||
print(delta.archivePath.lastPathComponent, error);
|
||||
}
|
||||
group.leave();
|
||||
}
|
||||
if let publicEdKey = item.publicEdKey, let privateEdKey = keys.privateEdKey {
|
||||
do {
|
||||
delta.edSignature = try edSignature(path: deltaPath, publicEdKey: publicEdKey, privateEdKey: privateEdKey);
|
||||
} catch {
|
||||
print(delta.archivePath.lastPathComponent, error);
|
||||
}
|
||||
}
|
||||
if delta.dsaSignature != nil || delta.edSignature != nil {
|
||||
latestItem.deltas.append(delta);
|
||||
} else {
|
||||
markDeltaAsIgnored(delta: delta, markerPath: ignoreMarkerPath)
|
||||
print("Delta \(delta.archivePath.path) ignored, because it could not be signed");
|
||||
}
|
||||
group.leave();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,3 +153,8 @@ func makeAppcast(archivesSourceDir: URL, privateKey: SecKey, verbose: Bool) thro
|
||||
|
||||
return updatesByAppcast;
|
||||
}
|
||||
|
||||
func markDeltaAsIgnored(delta: DeltaUpdate, markerPath: URL) {
|
||||
let _ = try? FileManager.default.removeItem(at: delta.archivePath)
|
||||
let _ = try? Data.init().write(to: markerPath); // 0-sized file
|
||||
}
|
||||
@@ -9,6 +9,7 @@ class DeltaUpdate {
|
||||
let fromVersion: String;
|
||||
let archivePath: URL;
|
||||
var dsaSignature: String?;
|
||||
var edSignature: String?;
|
||||
|
||||
init(fromVersion: String, archivePath: URL) {
|
||||
self.archivePath = archivePath;
|
||||
@@ -38,18 +39,27 @@ class ArchiveItem: CustomStringConvertible {
|
||||
let archivePath: URL;
|
||||
let appPath: URL;
|
||||
let feedURL: URL?;
|
||||
let publicEdKey: Data?;
|
||||
let supportsDSA: Bool;
|
||||
let archiveFileAttributes: [FileAttributeKey:Any];
|
||||
var deltas: [DeltaUpdate];
|
||||
|
||||
var dsaSignature: String?;
|
||||
var edSignature: String?;
|
||||
|
||||
init(version: String, shortVersion: String?, feedURL: URL?, minimumSystemVersion: String?, appPath: URL, archivePath: URL) throws {
|
||||
init(version: String, shortVersion: String?, feedURL: URL?, minimumSystemVersion: String?, publicEdKey: String?, supportsDSA: Bool, appPath: URL, archivePath: URL) throws {
|
||||
self.version = version;
|
||||
self._shortVersion = shortVersion;
|
||||
self.feedURL = feedURL;
|
||||
self.minimumSystemVersion = minimumSystemVersion ?? "10.7";
|
||||
self.archivePath = archivePath;
|
||||
self.appPath = appPath;
|
||||
self.supportsDSA = supportsDSA;
|
||||
if let publicEdKey = publicEdKey {
|
||||
self.publicEdKey = Data(base64Encoded: publicEdKey);
|
||||
} else {
|
||||
self.publicEdKey = nil;
|
||||
}
|
||||
self.archiveFileAttributes = try FileManager.default.attributesOfItem(atPath: self.archivePath.path);
|
||||
self.deltas = [];
|
||||
}
|
||||
@@ -70,9 +80,11 @@ class ArchiveItem: CustomStringConvertible {
|
||||
throw makeError(code: .unarchivingError, "No plist \(appPath.path)");
|
||||
}
|
||||
guard let version = infoPlist[kCFBundleVersionKey] as? String else {
|
||||
throw makeError(code: .unarchivingError, "No Version \(kCFBundleVersionKey) \(appPath)");
|
||||
throw makeError(code: .unarchivingError, "No Version \(kCFBundleVersionKey as String? ?? "missing kCFBundleVersionKey") \(appPath)");
|
||||
}
|
||||
let shortVersion = infoPlist["CFBundleShortVersionString"] as? String;
|
||||
let publicEdKey = infoPlist[SUPublicEDKeyKey] as? String;
|
||||
let supportsDSA = infoPlist[SUPublicDSAKeyKey] != nil || infoPlist[SUPublicDSAKeyFileKey] != nil;
|
||||
|
||||
var feedURL:URL? = nil;
|
||||
if let feedURLStr = infoPlist["SUFeedURL"] as? String {
|
||||
@@ -83,6 +95,8 @@ class ArchiveItem: CustomStringConvertible {
|
||||
shortVersion: shortVersion,
|
||||
feedURL: feedURL,
|
||||
minimumSystemVersion: infoPlist["LSMinimumSystemVersion"] as? String,
|
||||
publicEdKey: publicEdKey,
|
||||
supportsDSA: supportsDSA,
|
||||
appPath: appPath,
|
||||
archivePath: archivePath);
|
||||
} else {
|
||||
|
||||
@@ -112,19 +112,19 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
|
||||
descElement.setChildren([cdata]);
|
||||
}
|
||||
|
||||
var minVer = findElement(name: "sparkle:minimumSystemVersion", parent: item);
|
||||
var minVer = findElement(name: SUAppcastElementMinimumSystemVersion, parent: item);
|
||||
if nil == minVer {
|
||||
minVer = XMLElement.element(withName: "sparkle:minimumSystemVersion", uri: sparkleNS) as? XMLElement;
|
||||
minVer = XMLElement.element(withName: SUAppcastElementMinimumSystemVersion, uri: sparkleNS) as? XMLElement;
|
||||
linebreak(item);
|
||||
item.addChild(minVer!);
|
||||
}
|
||||
minVer?.setChildren([text(update.minimumSystemVersion)]);
|
||||
|
||||
let relElement = findElement(name: "sparkle:releaseNotesLink", parent: item);
|
||||
let relElement = findElement(name: SUAppcastElementReleaseNotesLink, parent: item);
|
||||
if let url = update.releaseNotesURL {
|
||||
if nil == relElement {
|
||||
linebreak(item);
|
||||
item.addChild(XMLElement.element(withName:"sparkle:releaseNotesLink", stringValue: url.absoluteString) as! XMLElement);
|
||||
item.addChild(XMLElement.element(withName: SUAppcastElementReleaseNotesLink, stringValue: url.absoluteString) as! XMLElement);
|
||||
}
|
||||
} else if let childIndex = relElement?.index {
|
||||
item.removeChild(at: childIndex);
|
||||
@@ -142,20 +142,23 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
|
||||
};
|
||||
var attributes = [
|
||||
XMLNode.attribute(withName: "url", stringValue: archiveURL) as! XMLNode,
|
||||
XMLNode.attribute(withName: "sparkle:version", uri: sparkleNS, stringValue: update.version) as! XMLNode,
|
||||
XMLNode.attribute(withName: "sparkle:shortVersionString", uri: sparkleNS, stringValue: update.shortVersion) as! XMLNode,
|
||||
XMLNode.attribute(withName: SUAppcastAttributeVersion, uri: sparkleNS, stringValue: update.version) as! XMLNode,
|
||||
XMLNode.attribute(withName: SUAppcastAttributeShortVersionString, uri: sparkleNS, stringValue: update.shortVersion) as! XMLNode,
|
||||
XMLNode.attribute(withName: "length", stringValue: String(update.fileSize)) as! XMLNode,
|
||||
XMLNode.attribute(withName: "type", stringValue: update.mimeType) as! XMLNode,
|
||||
];
|
||||
if let sig = update.edSignature {
|
||||
attributes.append(XMLNode.attribute(withName: SUAppcastAttributeEDSignature, uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
}
|
||||
if let sig = update.dsaSignature {
|
||||
attributes.append(XMLNode.attribute(withName: "sparkle:dsaSignature", uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
attributes.append(XMLNode.attribute(withName: SUAppcastAttributeDSASignature, uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
}
|
||||
enclosure!.attributes = attributes;
|
||||
|
||||
if update.deltas.count > 0 {
|
||||
var deltas = findElement(name: "sparkle:deltas", parent: item);
|
||||
var deltas = findElement(name: SUAppcastElementDeltas, parent: item);
|
||||
if nil == deltas {
|
||||
deltas = XMLElement.element(withName: "sparkle:deltas", uri: sparkleNS) as? XMLElement;
|
||||
deltas = XMLElement.element(withName: SUAppcastElementDeltas, uri: sparkleNS) as? XMLElement;
|
||||
linebreak(item);
|
||||
item.addChild(deltas!);
|
||||
} else {
|
||||
@@ -164,14 +167,17 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
|
||||
for delta in update.deltas {
|
||||
var attributes = [
|
||||
XMLNode.attribute(withName: "url", stringValue: URL(string: delta.archivePath.lastPathComponent.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlPathAllowed)!, relativeTo: update.archiveURL)!.absoluteString) as! XMLNode,
|
||||
XMLNode.attribute(withName: "sparkle:version", uri: sparkleNS, stringValue: update.version) as! XMLNode,
|
||||
XMLNode.attribute(withName: "sparkle:shortVersionString", uri: sparkleNS, stringValue: update.shortVersion) as! XMLNode,
|
||||
XMLNode.attribute(withName: "sparkle:deltaFrom", uri: sparkleNS, stringValue: delta.fromVersion) as! XMLNode,
|
||||
XMLNode.attribute(withName: SUAppcastAttributeVersion, uri: sparkleNS, stringValue: update.version) as! XMLNode,
|
||||
XMLNode.attribute(withName: SUAppcastAttributeShortVersionString, uri: sparkleNS, stringValue: update.shortVersion) as! XMLNode,
|
||||
XMLNode.attribute(withName: SUAppcastAttributeDeltaFrom, uri: sparkleNS, stringValue: delta.fromVersion) as! XMLNode,
|
||||
XMLNode.attribute(withName: "length", stringValue: String(delta.fileSize)) as! XMLNode,
|
||||
XMLNode.attribute(withName: "type", stringValue: "application/octet-stream") as! XMLNode,
|
||||
];
|
||||
if let sig = delta.edSignature {
|
||||
attributes.append(XMLNode.attribute(withName: SUAppcastAttributeEDSignature, uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
}
|
||||
if let sig = delta.dsaSignature {
|
||||
attributes.append(XMLNode.attribute(withName: "sparkle:dsaSignature", uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
attributes.append(XMLNode.attribute(withName: SUAppcastAttributeDSASignature, uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
}
|
||||
linebreak(deltas!);
|
||||
deltas!.addChild(XMLNode.element(withName: "enclosure", children: nil, attributes: attributes) as! XMLElement);
|
||||
|
||||
@@ -5,7 +5,17 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
func loadPrivateKey(at privateKeyURL: URL) throws -> SecKey {
|
||||
struct PrivateKeys {
|
||||
var privateDSAKey: SecKey?;
|
||||
var privateEdKey: Data?;
|
||||
|
||||
init(privateDSAKey: SecKey?, privateEdKey: Data?) {
|
||||
self.privateDSAKey = privateDSAKey;
|
||||
self.privateEdKey = privateEdKey;
|
||||
}
|
||||
}
|
||||
|
||||
func loadPrivateDSAKey(at privateKeyURL: URL) throws -> SecKey {
|
||||
let data = try Data(contentsOf: privateKeyURL);
|
||||
|
||||
var cfitems: CFArray? = nil;
|
||||
@@ -25,7 +35,7 @@ func loadPrivateKey(at privateKeyURL: URL) throws -> SecKey {
|
||||
return (cfitems! as NSArray)[0] as! SecKey;
|
||||
}
|
||||
|
||||
func loadPrivateKey(named keyName: String, fromKeychainAt keychainURL: URL) throws -> SecKey {
|
||||
func loadPrivateDSAKey(named keyName: String, fromKeychainAt keychainURL: URL) throws -> SecKey {
|
||||
var keychain: SecKeychain? = nil
|
||||
|
||||
guard SecKeychainOpen(keychainURL.path, &keychain) == errSecSuccess, keychain != nil else {
|
||||
@@ -49,7 +59,7 @@ func loadPrivateKey(named keyName: String, fromKeychainAt keychainURL: URL) thro
|
||||
return item! as! SecKey
|
||||
}
|
||||
|
||||
func dsaSignature(path: URL, privateKey: SecKey) throws -> String {
|
||||
func dsaSignature(path: URL, privateDSAKey: SecKey) throws -> String {
|
||||
|
||||
var error: Unmanaged<CFError>?;
|
||||
|
||||
@@ -57,7 +67,7 @@ func dsaSignature(path: URL, privateKey: SecKey) throws -> String {
|
||||
let dataReadTransform = SecTransformCreateReadTransformWithReadStream(stream);
|
||||
|
||||
let dataDigestTransform = SecDigestTransformCreate(kSecDigestSHA1, 20, nil);
|
||||
guard let dataSignTransform = SecSignTransformCreate(privateKey, &error) else {
|
||||
guard let dataSignTransform = SecSignTransformCreate(privateDSAKey, &error) else {
|
||||
print("can't use the key");
|
||||
throw error!.takeRetainedValue();
|
||||
}
|
||||
@@ -82,3 +92,21 @@ func dsaSignature(path: URL, privateKey: SecKey) throws -> String {
|
||||
}
|
||||
return resultData.base64EncodedString();
|
||||
}
|
||||
|
||||
func edSignature(path: URL, publicEdKey: Data, privateEdKey: Data) throws -> String {
|
||||
assert(publicEdKey.count == 32)
|
||||
assert(privateEdKey.count == 64)
|
||||
let data = try Data.init(contentsOf: path, options: .mappedIfSafe);
|
||||
let len = data.count;
|
||||
var output = Data(count: 64);
|
||||
output.withUnsafeMutableBytes({ (output: UnsafeMutablePointer<UInt8>) in
|
||||
data.withUnsafeBytes({ (data: UnsafePointer<UInt8>) in
|
||||
publicEdKey.withUnsafeBytes({ (publicEdKey: UnsafePointer<UInt8>) in
|
||||
privateEdKey.withUnsafeBytes({ (privateEdKey: UnsafePointer<UInt8>) in
|
||||
ed25519_sign(output, data, len, publicEdKey, privateEdKey)
|
||||
});
|
||||
});
|
||||
})
|
||||
});
|
||||
return output.base64EncodedString();
|
||||
}
|
||||
@@ -13,7 +13,11 @@ func unarchive(itemPath:URL, archiveDestDir: URL, callback: @escaping (Error?) -
|
||||
_ = try? fileManager.createDirectory(at: tempDir, withIntermediateDirectories: true, attributes: [:]);
|
||||
|
||||
do {
|
||||
try fileManager.linkItem(at: itemPath, to: itemCopy);
|
||||
do {
|
||||
try fileManager.linkItem(at: itemPath, to: itemCopy);
|
||||
} catch {
|
||||
try fileManager.copyItem(at: itemPath, to: itemCopy);
|
||||
}
|
||||
if let unarchiver = SUUnarchiver.unarchiver(forPath: itemCopy.path, updatingHostBundlePath:nil, decryptionPassword:nil) {
|
||||
unarchiver.unarchive(completionBlock: { (error: Error?) in
|
||||
if error != nil {
|
||||
@@ -39,8 +43,7 @@ func unarchive(itemPath:URL, archiveDestDir: URL, callback: @escaping (Error?) -
|
||||
}
|
||||
}
|
||||
|
||||
func unarchiveUpdates(archivesSourceDir: URL, verbose: Bool) throws -> [ArchiveItem] {
|
||||
let archivesDestDir = archivesSourceDir.appendingPathComponent(".tmp");
|
||||
func unarchiveUpdates(archivesSourceDir: URL, archivesDestDir: URL, verbose: Bool) throws -> [ArchiveItem] {
|
||||
if verbose {
|
||||
print("Unarchiving to temp directory", archivesDestDir.path);
|
||||
}
|
||||
|
||||
+35
-14
@@ -12,39 +12,59 @@ var verbose = false;
|
||||
|
||||
func printUsage() {
|
||||
let command = URL(fileURLWithPath: CommandLine.arguments.first!).lastPathComponent;
|
||||
print("Generate appcast from a directory of Sparkle updates\n",
|
||||
print("Generate appcast from a directory of Sparkle update archives\n",
|
||||
"Usage:\n",
|
||||
" \(command) < -f private key path | -k keychain_path -n key_name > <directory with update archives>\n",
|
||||
" e.g. \(command) -k ~/Library/Keychains/login.keychain -n 'My Private Key' archives/\n",
|
||||
"\nOR (legacy)\n\n",
|
||||
" \(command) <private key path> <directory with update archives>\n",
|
||||
" \(command) <directory with update files>\n",
|
||||
" e.g. \(command) ./my-app-release-zipfiles/\n",
|
||||
"\nOR for old apps that have a DSA keys (deprecated):\n",
|
||||
" \(command) <private DSA key path> <directory with update files>\n",
|
||||
" e.g. \(command) dsa_priv.pem archives/\n",
|
||||
"\n",
|
||||
" Appcast files and deltas will be written to the archives directory.\n",
|
||||
" Note that pkg-based updates are not supported.\n"
|
||||
"Appcast files and deltas will be written to the archives directory.\n",
|
||||
"Note that pkg-based updates are not supported.\n"
|
||||
)
|
||||
}
|
||||
|
||||
func loadPrivateKeys(_ privateDSAKey: SecKey?) -> PrivateKeys {
|
||||
var privateEdKey: Data?;
|
||||
var item: CFTypeRef?;
|
||||
let res = SecItemCopyMatching([
|
||||
kSecClass as String: kSecClassGenericPassword,
|
||||
kSecAttrService as String: "https://sparkle-project.org",
|
||||
kSecAttrAccount as String: "ed25519",
|
||||
kSecAttrProtocol as String: kSecAttrProtocolSSH,
|
||||
kSecReturnData as String: kCFBooleanTrue,
|
||||
] as CFDictionary, &item);
|
||||
if res == errSecSuccess, let encoded = item as? Data, let keys = Data(base64Encoded: encoded) {
|
||||
privateEdKey = keys[0..<64];
|
||||
} else {
|
||||
print("Warning: Private key not found in the Keychain (\(res)). Please run the generate_keys tool");
|
||||
}
|
||||
return PrivateKeys(privateDSAKey: privateDSAKey, privateEdKey: privateEdKey);
|
||||
}
|
||||
|
||||
func main() {
|
||||
let args = CommandLine.arguments;
|
||||
if args.count < 3 {
|
||||
if args.count < 2 {
|
||||
printUsage()
|
||||
exit(1)
|
||||
}
|
||||
|
||||
let privateKey: SecKey
|
||||
|
||||
var privateDSAKey: SecKey? = nil;
|
||||
|
||||
// this was typical usage for DSA keys
|
||||
if args.count == 3 || (args.count == 4 && args[1] == "-f") {
|
||||
// private key specified by filename
|
||||
let privateKeyURL = URL(fileURLWithPath: args.count == 3 ? args[1] : args[2])
|
||||
|
||||
do {
|
||||
privateKey = try loadPrivateKey(at: privateKeyURL)
|
||||
privateDSAKey = try loadPrivateDSAKey(at: privateKeyURL)
|
||||
} catch {
|
||||
print("Unable to load DSA private key from", privateKeyURL.path, "\n", error)
|
||||
exit(1)
|
||||
}
|
||||
}
|
||||
// this is legacy for DSA keychain; probably very rarely used
|
||||
else if args.count == 6 && (args[1] == "-n" || args[1] == "-k") {
|
||||
// private key specified by keychain + key name
|
||||
let keyName: String
|
||||
@@ -70,21 +90,22 @@ func main() {
|
||||
}
|
||||
|
||||
do {
|
||||
privateKey = try loadPrivateKey(named: keyName, fromKeychainAt: keychainURL)
|
||||
privateDSAKey = try loadPrivateDSAKey(named: keyName, fromKeychainAt: keychainURL)
|
||||
} catch {
|
||||
print("Unable to load DSA private key '\(keyName)' from keychain at", keychainURL.path, "\n", error)
|
||||
exit(1)
|
||||
}
|
||||
}
|
||||
else {
|
||||
else if args.count != 2 {
|
||||
printUsage()
|
||||
exit(1)
|
||||
}
|
||||
|
||||
let archivesSourceDir = URL(fileURLWithPath: args.last!, isDirectory: true)
|
||||
let keys = loadPrivateKeys(privateDSAKey)
|
||||
|
||||
do {
|
||||
let allUpdates = try makeAppcast(archivesSourceDir: archivesSourceDir, privateKey: privateKey, verbose:verbose);
|
||||
let allUpdates = try makeAppcast(archivesSourceDir: archivesSourceDir, keys: keys, verbose:verbose);
|
||||
|
||||
for (appcastFile, updates) in allUpdates {
|
||||
let appcastDestPath = URL(fileURLWithPath: appcastFile, relativeTo: archivesSourceDir);
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "SUConstants.h"
|
||||
#import "SUErrors.h"
|
||||
#import "SUSignatures.h"
|
||||
#import "../ed25519/src/ed25519.h" // run `git submodule update --init` if you get an erorr here
|
||||
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// main.swift
|
||||
// generate_keys
|
||||
//
|
||||
// Created by Kornel on 15/09/2018.
|
||||
// Copyright © 2018 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Security
|
||||
|
||||
func findPublicKey() -> Data? {
|
||||
var item: CFTypeRef?;
|
||||
let res = SecItemCopyMatching([
|
||||
kSecClass as String: kSecClassGenericPassword,
|
||||
kSecAttrService as String: "https://sparkle-project.org",
|
||||
kSecAttrAccount as String: "ed25519",
|
||||
kSecAttrProtocol as String: kSecAttrProtocolSSH,
|
||||
kSecReturnData as String: kCFBooleanTrue,
|
||||
] as CFDictionary, &item);
|
||||
if res == errSecSuccess, let encoded = item as? Data, let keys = Data(base64Encoded: encoded) {
|
||||
print("OK! Read the existing key saved in the Keychain.");
|
||||
return keys[64...]
|
||||
}
|
||||
else if res == errSecItemNotFound {
|
||||
return nil;
|
||||
}
|
||||
else if res == errSecAuthFailed {
|
||||
print("\nERROR! Access denied. Can't check existing keys in the keychain.");
|
||||
print("Go to Keychain Access.app, lock the login keychain, then unlock it again.");
|
||||
}
|
||||
else if res == errSecUserCanceled {
|
||||
print("\nABORTED! You've cancelled the request to read the key from the Keychain. Please run the tool again.");
|
||||
} else {
|
||||
print("\nERROR! Unable to access existing item in the Keychain", res, "(you can look it up at osstatus.com)");
|
||||
}
|
||||
exit(1)
|
||||
}
|
||||
|
||||
func generateKeyPair() -> Data {
|
||||
var seed = Data(count: 32);
|
||||
var publicEdKey = Data(count: 32);
|
||||
var privateEdKey = Data(count: 64);
|
||||
|
||||
if !seed.withUnsafeMutableBytes { (seed: UnsafeMutablePointer<UInt8>) in 0 == ed25519_create_seed(seed)} {
|
||||
print("\nERROR: Unable to initialize random seed");
|
||||
exit(1)
|
||||
}
|
||||
|
||||
seed.withUnsafeBytes({(seed: UnsafePointer<UInt8>) in
|
||||
publicEdKey.withUnsafeMutableBytes({(publicEdKey: UnsafeMutablePointer<UInt8>) in
|
||||
privateEdKey.withUnsafeMutableBytes({(privateEdKey: UnsafeMutablePointer<UInt8>) in
|
||||
ed25519_create_keypair(publicEdKey, privateEdKey, seed);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
let bothKeys = privateEdKey + publicEdKey; // public key can't be derived from the private one
|
||||
let query = [
|
||||
// macOS doesn't support ed25519 keys, so we're forced to save the key as a "password"
|
||||
// and add some made-up service data for it to prevent it clashing with other passwords.
|
||||
kSecClass as String: kSecClassGenericPassword,
|
||||
kSecAttrService as String: "https://sparkle-project.org",
|
||||
kSecAttrAccount as String: "ed25519",
|
||||
|
||||
kSecValueData as String: bothKeys.base64EncodedData() as CFData, // it's base64-encoded, because user may request to show it
|
||||
kSecAttrIsSensitive as String: kCFBooleanTrue,
|
||||
kSecAttrIsPermanent as String: kCFBooleanTrue,
|
||||
kSecAttrLabel as String: "Private key for signing Sparkle updates",
|
||||
kSecAttrComment as String: "Public key (SUPublicEDKey value) for this key is:\n\n\(publicEdKey.base64EncodedString())",
|
||||
kSecAttrDescription as String: "private key",
|
||||
] as CFDictionary;
|
||||
let res = SecItemAdd(query, nil);
|
||||
|
||||
if res == errSecSuccess {
|
||||
print("OK! A new key has been generated and saved in the Keychain.");
|
||||
}
|
||||
else if res == errSecDuplicateItem {
|
||||
print("\nERROR: You already have a previously generated key in the Keychain");
|
||||
} else if res == errSecAuthFailed {
|
||||
print("\nERROR: System denied access to the Keychain. Unable to save the new key");
|
||||
print("Go to Keychain Access.app, lock the login keychain, then unlock it again.");
|
||||
} else {
|
||||
print("\nERROR: The key could not be saved to the Keychain. error: \(res) (you can look it up at osstatus.com)");
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
print("This tool uses macOS Keychain to store the Sparkle private key.")
|
||||
print("If the Keychain prompts you for permission, please allow it.")
|
||||
let pubKey = findPublicKey() ?? generateKeyPair();
|
||||
print("\nIn your app's Info.plist set SUPublicEDKey to:\n\(pubKey.base64EncodedString())\n")
|
||||
@@ -0,0 +1,70 @@
|
||||
//
|
||||
// main.swift
|
||||
// sign_update
|
||||
//
|
||||
// Created by Kornel on 16/09/2018.
|
||||
// Copyright © 2018 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Security
|
||||
|
||||
func findKeys() -> (Data, Data) {
|
||||
var item: CFTypeRef?;
|
||||
let res = SecItemCopyMatching([
|
||||
kSecClass as String: kSecClassGenericPassword,
|
||||
kSecAttrService as String: "https://sparkle-project.org",
|
||||
kSecAttrAccount as String: "ed25519",
|
||||
kSecAttrProtocol as String: kSecAttrProtocolSSH,
|
||||
kSecReturnData as String: kCFBooleanTrue,
|
||||
] as CFDictionary, &item);
|
||||
if res == errSecSuccess, let encoded = item as? Data, let keys = Data(base64Encoded: encoded) {
|
||||
return (keys[0..<64], keys[64..<(64+32)])
|
||||
}
|
||||
else if res == errSecItemNotFound {
|
||||
print("ERROR! Signing key not found. Please run generate_keys tool first.");
|
||||
}
|
||||
else if res == errSecAuthFailed {
|
||||
print("ERROR! Access denied. Can't get keys from the keychain.");
|
||||
print("Go to Keychain Access.app, lock the login keychain, then unlock it again.");
|
||||
}
|
||||
else if res == errSecUserCanceled {
|
||||
print("ABORTED! You've cancelled the request to read the key from the Keychain. Please run the tool again.");
|
||||
} else {
|
||||
print("ERROR! Unable to access required key in the Keychain", res, "(you can look it up at osstatus.com)");
|
||||
}
|
||||
exit(1)
|
||||
}
|
||||
|
||||
func edSignature(data: Data, publicEdKey: Data, privateEdKey: Data) -> String {
|
||||
assert(publicEdKey.count == 32)
|
||||
assert(privateEdKey.count == 64)
|
||||
let len = data.count;
|
||||
var output = Data(count: 64);
|
||||
output.withUnsafeMutableBytes({ (output: UnsafeMutablePointer<UInt8>) in
|
||||
data.withUnsafeBytes({ (data: UnsafePointer<UInt8>) in
|
||||
publicEdKey.withUnsafeBytes({ (publicEdKey: UnsafePointer<UInt8>) in
|
||||
privateEdKey.withUnsafeBytes({ (privateEdKey: UnsafePointer<UInt8>) in
|
||||
ed25519_sign(output, data, len, publicEdKey, privateEdKey)
|
||||
});
|
||||
});
|
||||
})
|
||||
});
|
||||
return output.base64EncodedString();
|
||||
}
|
||||
|
||||
let args = CommandLine.arguments;
|
||||
if args.count != 2 {
|
||||
print("Usage: \(args[0]) <archive to sign>\nPrivavte EdDSA (ed25519) key is automatically read from the Keychain.\n");
|
||||
exit(1)
|
||||
}
|
||||
|
||||
let(priv, pub) = findKeys();
|
||||
|
||||
do {
|
||||
let data = try Data.init(contentsOf: URL.init(fileURLWithPath: args[1]), options: .mappedIfSafe);
|
||||
let sig = edSignature(data:data , publicEdKey: pub, privateEdKey: priv);
|
||||
print("sparkle:edSignature=\"\(sig)\" length=\"\(data.count)\"");
|
||||
} catch {
|
||||
print("ERROR: ", error)
|
||||
}
|
||||
Reference in new issue
Block a user