File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ public class SignatureValidator {
56
56
private static let signInfoFlags : SecCSFlags = . init( rawValue: kSecCSSigningInformation)
57
57
58
58
// `expectedVersion` must be of the form `[0-9]+.[0-9]+.[0-9]+`
59
- // swiftlint:disable:next cyclomatic_complexity
60
59
public static func validate( path: URL , expectedVersion: String ) throws ( ValidationError) {
61
60
guard FileManager . default. fileExists ( atPath: path. path) else {
62
61
throw . fileNotFound
@@ -97,6 +96,10 @@ public class SignatureValidator {
97
96
throw . missingInfoPList
98
97
}
99
98
99
+ try validateInfo ( infoPlist: infoPlist, expectedVersion: expectedVersion)
100
+ }
101
+
102
+ private static func validateInfo( infoPlist: [ String : AnyObject ] , expectedVersion: String ) throws ( ValidationError) {
100
103
guard let plistIdent = infoPlist [ infoIdentifierKey] as? String , plistIdent == expectedIdentifier else {
101
104
throw . invalidIdentifier( identifier: infoPlist [ infoIdentifierKey] as? String )
102
105
}
You can’t perform that action at this time.
0 commit comments