We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentfc143de commit27a805aCopy full SHA for 27a805a
Coder Desktop/VPNLib/Download.swift
@@ -56,7 +56,6 @@ public class SignatureValidator {
56
privatestaticletsignInfoFlags:SecCSFlags=.init(rawValue: kSecCSSigningInformation)
57
58
// `expectedVersion` must be of the form `[0-9]+.[0-9]+.[0-9]+`
59
- // swiftlint:disable:next cyclomatic_complexity
60
publicstaticfunc validate(path:URL, expectedVersion:String)throws(ValidationError){
61
guardFileManager.default.fileExists(atPath: path.path)else{
62
throw.fileNotFound
@@ -97,6 +96,10 @@ public class SignatureValidator {
97
96
throw.missingInfoPList
98
}
99
+tryvalidateInfo(infoPlist: infoPlist, expectedVersion: expectedVersion)
100
+}
101
+
102
+privatestaticfunc validateInfo(infoPlist:[String:AnyObject], expectedVersion:String)throws(ValidationError){
103
guardlet plistIdent=infoPlist[infoIdentifierKey]as?String, plistIdent== expectedIdentifierelse{
104
throw.invalidIdentifier(identifier:infoPlist[infoIdentifierKey]as?String)
105