Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit27a805a

Browse files
committed
new function
1 parentfc143de commit27a805a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎Coder Desktop/VPNLib/Download.swift‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public class SignatureValidator {
5656
privatestaticletsignInfoFlags: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
publicstaticfunc validate(path:URL, expectedVersion:String)throws(ValidationError){
6160
guardFileManager.default.fileExists(atPath: path.path)else{
6261
throw.fileNotFound
@@ -97,6 +96,10 @@ public class SignatureValidator {
9796
throw.missingInfoPList
9897
}
9998

99+
tryvalidateInfo(infoPlist: infoPlist, expectedVersion: expectedVersion)
100+
}
101+
102+
privatestaticfunc validateInfo(infoPlist:[String:AnyObject], expectedVersion:String)throws(ValidationError){
100103
guardlet plistIdent=infoPlist[infoIdentifierKey]as?String, plistIdent== expectedIdentifierelse{
101104
throw.invalidIdentifier(identifier:infoPlist[infoIdentifierKey]as?String)
102105
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp