diff --git a/generate_appcast/DSASignature.swift b/generate_appcast/DSASignature.swift index eccd1e18..2a9e37bf 100644 --- a/generate_appcast/DSASignature.swift +++ b/generate_appcast/DSASignature.swift @@ -5,8 +5,8 @@ import Foundation -func loadPrivateKey(privateKeyPath: URL) throws -> SecKey { - let data = try Data(contentsOf: privateKeyPath); +func loadPrivateKey(at privateKeyURL: URL) throws -> SecKey { + let data = try Data(contentsOf: privateKeyURL); var cfitems: CFArray? = nil; var format = SecExternalFormat.formatOpenSSL; @@ -14,7 +14,7 @@ func loadPrivateKey(privateKeyPath: URL) throws -> SecKey { let status = SecItemImport(data as CFData, nil, &format, &type, SecItemImportExportFlags(rawValue: UInt32(0)), nil, nil, &cfitems); if (status != errSecSuccess || cfitems == nil) { - print("Private DSA key file", privateKeyPath, "exists, but it could not be read. SecItemImport error", status); + print("Private DSA key file", privateKeyURL.path, "exists, but it could not be read. SecItemImport error", status); throw NSError(domain: SUSparkleErrorDomain, code: Int(OSStatus(SUError.signatureError.rawValue)), userInfo: nil); } diff --git a/generate_appcast/main.swift b/generate_appcast/main.swift index 58b12a96..4ab62d1b 100644 --- a/generate_appcast/main.swift +++ b/generate_appcast/main.swift @@ -22,11 +22,11 @@ func main() { exit(1); } - let privateKeyPath = URL(fileURLWithPath: args[1]); + let privateKeyURL = URL(fileURLWithPath: args[1]); let archivesSourceDir = URL(fileURLWithPath: args[2], isDirectory:true); do { - let privateKey = try loadPrivateKey(privateKeyPath: privateKeyPath); + let privateKey = try loadPrivateKey(at: privateKeyURL); do { let allUpdates = try makeAppcast(archivesSourceDir: archivesSourceDir, privateKey: privateKey, verbose:verbose); @@ -40,7 +40,7 @@ func main() { exit(1); } } catch { - print("Unable to load DSA private key from", privateKeyPath.path, "\n", error); + print("Unable to load DSA private key from", privateKeyURL.path, "\n", error); exit(1); } }