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