mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-30 05:28:50 +00:00
Emit edSignature in the appcast
This commit is contained in:
1 parent
d90529ccaa
commit
19be83b15f
2 files changed
+8
-2
No files matched your search
@@ -83,8 +83,8 @@ class ArchiveItem: CustomStringConvertible {
|
||||
throw makeError(code: .unarchivingError, "No Version \(kCFBundleVersionKey as String? ?? "missing kCFBundleVersionKey") \(appPath)");
|
||||
}
|
||||
let shortVersion = infoPlist["CFBundleShortVersionString"] as? String;
|
||||
let publicEdKey = infoPlist["SUPublicEDKey"] as? String;
|
||||
let supportsDSA = infoPlist["SUPublicDSAKey"] != nil || infoPlist["SUPublicDSAKeyFile"] != nil;
|
||||
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 {
|
||||
|
||||
@@ -147,6 +147,9 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
|
||||
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: "sparkle:edSignature", uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
}
|
||||
if let sig = update.dsaSignature {
|
||||
attributes.append(XMLNode.attribute(withName: "sparkle:dsaSignature", uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
}
|
||||
@@ -170,6 +173,9 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
|
||||
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: "sparkle:edSignature", uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
}
|
||||
if let sig = delta.dsaSignature {
|
||||
attributes.append(XMLNode.attribute(withName: "sparkle:dsaSignature", uri: sparkleNS, stringValue: sig) as! XMLNode);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user