Skip to content

Commit 598705f

Browse files
committed
Merge branch 'build/1.12.0'
2 parents 378ad43 + 8646af7 commit 598705f

File tree

10 files changed

+78
-224
lines changed

10 files changed

+78
-224
lines changed

Authenticator.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@
10821082
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
10831083
CODE_SIGN_ENTITLEMENTS = Authenticator/Authenticator.entitlements;
10841084
CODE_SIGN_STYLE = Automatic;
1085-
CURRENT_PROJECT_VERSION = 181;
1085+
CURRENT_PROJECT_VERSION = 187;
10861086
DEVELOPMENT_TEAM = LQA3CS5MM7;
10871087
HEADER_SEARCH_PATHS = "../Submodules/YubiKit/**";
10881088
INFOPLIST_FILE = Authenticator/Info.plist;
@@ -1092,7 +1092,7 @@
10921092
"@executable_path/Frameworks",
10931093
);
10941094
LIBRARY_SEARCH_PATHS = "";
1095-
MARKETING_VERSION = 1.11.1;
1095+
MARKETING_VERSION = 1.12;
10961096
OTHER_LDFLAGS = "-ObjC";
10971097
PRODUCT_BUNDLE_IDENTIFIER = com.yubico.Authenticator;
10981098
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1113,7 +1113,7 @@
11131113
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
11141114
CODE_SIGN_ENTITLEMENTS = Authenticator/Authenticator.entitlements;
11151115
CODE_SIGN_STYLE = Automatic;
1116-
CURRENT_PROJECT_VERSION = 181;
1116+
CURRENT_PROJECT_VERSION = 187;
11171117
DEVELOPMENT_TEAM = LQA3CS5MM7;
11181118
HEADER_SEARCH_PATHS = "../Submodules/YubiKit/**";
11191119
INFOPLIST_FILE = Authenticator/Info.plist;
@@ -1123,7 +1123,7 @@
11231123
"@executable_path/Frameworks",
11241124
);
11251125
LIBRARY_SEARCH_PATHS = "";
1126-
MARKETING_VERSION = 1.11.1;
1126+
MARKETING_VERSION = 1.12;
11271127
OTHER_LDFLAGS = "-ObjC";
11281128
PRODUCT_BUNDLE_IDENTIFIER = com.yubico.Authenticator;
11291129
PRODUCT_NAME = "$(TARGET_NAME)";

Authenticator.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 0 additions & 15 deletions
This file was deleted.

Authenticator/Localizable.xcstrings

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"fr" : {
132132
"stringUnit" : {
133133
"state" : "translated",
134-
"value" : "%1$@ (construire %2$@)"
134+
"value" : "%1$@ (build %2$@)"
135135
}
136136
},
137137
"ja" : {
@@ -272,7 +272,7 @@
272272
"fr" : {
273273
"stringUnit" : {
274274
"state" : "translated",
275-
"value" : "Infos"
275+
"value" : "A propos"
276276
}
277277
},
278278
"ja" : {
@@ -475,7 +475,7 @@
475475
"fr" : {
476476
"stringUnit" : {
477477
"state" : "translated",
478-
"value" : "Ajouter compte"
478+
"value" : "Ajouter un compte"
479479
}
480480
},
481481
"ja" : {
@@ -1411,9 +1411,6 @@
14111411
}
14121412
}
14131413
},
1414-
"Decryption failed" : {
1415-
"comment" : "PIV extension decryption failed error message"
1416-
},
14171414
"Delete" : {
14181415
"comment" : "Menu",
14191416
"localizations" : {
@@ -2396,7 +2393,7 @@
23962393
"fr" : {
23972394
"stringUnit" : {
23982395
"state" : "translated",
2399-
"value" : "Comment cela fonctionne-t-il ?"
2396+
"value" : "Comment ça fonctionne ?"
24002397
}
24012398
},
24022399
"ja" : {
@@ -2424,7 +2421,7 @@
24242421
"fr" : {
24252422
"stringUnit" : {
24262423
"state" : "translated",
2427-
"value" : "Comment cela fonctionne-t-il"
2424+
"value" : "Comment ça fonctionne"
24282425
}
24292426
},
24302427
"ja" : {
@@ -2593,7 +2590,7 @@
25932590
"fr" : {
25942591
"stringUnit" : {
25952592
"state" : "translated",
2596-
"value" : "Insérez YubiKey"
2593+
"value" : "Insérez la YubiKey"
25972594
}
25982595
},
25992596
"ja" : {
@@ -2638,9 +2635,6 @@
26382635
}
26392636
}
26402637
},
2641-
"Invalid decryption" : {
2642-
"comment" : "PIV extension NFC invalid decryption"
2643-
},
26442638
"Invalid device info received from YubiKey" : {
26452639
"comment" : "Internal error message not to be displayed to the user.",
26462640
"localizations" : {
@@ -4148,7 +4142,7 @@
41484142
"ja" : {
41494143
"stringUnit" : {
41504144
"state" : "translated",
4151-
"value" : "暗証番号が設定されています"
4145+
"value" : "PIN が設定されています"
41524146
}
41534147
},
41544148
"sk" : {
@@ -5672,9 +5666,6 @@
56725666
}
56735667
}
56745668
},
5675-
"Successfully decrypted cipher data" : {
5676-
"comment" : "PIV extension NFC successfully decrypted cipher data"
5677-
},
56785669
"Successfully read" : {
56795670
"comment" : "iOS NFC alert successfully read",
56805671
"localizations" : {
@@ -5864,7 +5855,7 @@
58645855
"ja" : {
58655856
"stringUnit" : {
58665857
"state" : "translated",
5867-
"value" : "キーは別の操作で忙しい。"
5858+
"value" : "キーは別の操作を実行中です。"
58685859
}
58695860
},
58705861
"sk" : {
@@ -5906,7 +5897,7 @@
59065897
}
59075898
},
59085899
"The private key on the YubiKey does not match the certificate or there is no private key stored on the YubiKey." : {
5909-
"comment" : "PIV extension NFC invalid decryption no private key\nPIV extension NFC invalid signature no private key",
5900+
"comment" : "PIV extension NFC invalid signature no private key",
59105901
"localizations" : {
59115902
"de" : {
59125903
"stringUnit" : {
@@ -6436,13 +6427,13 @@
64366427
"ja" : {
64376428
"stringUnit" : {
64386429
"state" : "translated",
6439-
"value" : "FIPS鍵にアカウントを追加するには、まずOATHアプリケーションにパスワードを設定する必要がある。"
6430+
"value" : "FIPS キーにアカウントを追加する場合、先に OATH アプリケーションにパスワードを設定してください。"
64406431
}
64416432
},
64426433
"sk" : {
64436434
"stringUnit" : {
64446435
"state" : "translated",
6445-
"value" : "Ak chcete pridať účet do kľúča FIPS, musíte najprv nastaviť heslo pre aplikáciu OATH."
6436+
"value" : "Ak chcete pridať účet do FIPS kľúča, musíte najprv nastaviť heslo pre aplikáciu OATH."
64466437
}
64476438
}
64486439
}
@@ -6664,7 +6655,7 @@
66646655
"ja" : {
66656656
"stringUnit" : {
66666657
"state" : "translated",
6667-
"value" : "NFC YubiKeyをスキャンする際、Safariを開いてワンタイムパスワードをコピーするかどうかを設定します。"
6658+
"value" : "NFC YubiKey をスキャンしたときに、Safari を開いてワンタイムパスワードをコピーするかどうかを設定します。"
66686659
}
66696660
},
66706661
"sk" : {
@@ -6693,7 +6684,7 @@
66936684
"ja" : {
66946685
"stringUnit" : {
66956686
"state" : "translated",
6696-
"value" : "YubiKeyタッチ時のOTPコード出力ON/OFF。"
6687+
"value" : "YubiKey をタッチしたときに OTP コードを出力するかどうかを設定します。"
66976688
}
66986689
},
66996690
"sk" : {
@@ -7522,7 +7513,7 @@
75227513
"ja" : {
75237514
"stringUnit" : {
75247515
"state" : "translated",
7525-
"value" : "YubiKey 5Ci認証"
7516+
"value" : "YubiKey 5Ci 認証"
75267517
}
75277518
},
75287519
"sk" : {
@@ -7550,7 +7541,7 @@
75507541
"ja" : {
75517542
"stringUnit" : {
75527543
"state" : "translated",
7553-
"value" : "YubiKey 接続が見つかりません。"
7544+
"value" : "YubiKey との接続を確認できません。"
75547545
}
75557546
},
75567547
"sk" : {
@@ -7578,7 +7569,7 @@
75787569
"ja" : {
75797570
"stringUnit" : {
75807571
"state" : "translated",
7581-
"value" : "YubiKeyの接続が切れた。"
7572+
"value" : "YubiKey との接続が切断されました。"
75827573
}
75837574
},
75847575
"sk" : {

Authenticator/Model/CryptoTokenKit/TokenCertificateStorage.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ struct TokenCertificateStorage {
4141
tokenKeychainKey.label = label
4242
tokenKeychainKey.canSign = true
4343
tokenKeychainKey.isSuitableForLogin = true
44-
tokenKeychainKey.canDecrypt = true
45-
tokenKeychainKey.canPerformKeyExchange = true
4644

4745
// TODO: figure out when there might be multiple driverConfigurations and how to handle it
4846
guard let tokenDriverConfiguration = TKTokenDriver.Configuration.driverConfigurations.first?.value else {

Authenticator/Model/TokenRequestViewModel.swift

Lines changed: 29 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ class TokenRequestViewModel: NSObject {
101101
connection.startConnection { connection in
102102
connection.pivSession { session, error in
103103
guard let session = session else { Logger.ctk.error("No session: \(error!)"); return }
104-
guard let operationType = userInfo.operationType() else { Logger.ctk.error("No OperationType defined"); return }
105104
guard let type = userInfo.keyType(),
106105
let objectId = userInfo.objectId(),
107106
let algorithm = userInfo.algorithm(),
@@ -128,72 +127,35 @@ class TokenRequestViewModel: NSObject {
128127
return
129128
}
130129
}
131-
132-
switch operationType {
133-
case .signData:
134-
session.signWithKey(in: slot, type: type, algorithm: algorithm, message: message) { signature, error in
135-
// Handle any errors
136-
if let error = error, (error as NSError).code == 0x6a80 {
137-
YubiKitManager.shared.stopNFCConnection(withErrorMessage: String(localized: "Invalid signature", comment: "PIV extension NFC invalid signature"))
138-
completion(.communicationError(ErrorMessage(title: String(localized: "Invalid signature", comment: "PIV extension NFC invalid signature"),
139-
text: String(localized: "The private key on the YubiKey does not match the certificate or there is no private key stored on the YubiKey.", comment: "PIV extension NFC invalid signature no private key"))))
140-
return
141-
}
142-
if let error = error {
143-
completion(.communicationError(ErrorMessage(title: String(localized: "Signing failed", comment: "PIV extension signing failed error message"), text: error.localizedDescription)))
144-
return
145-
}
146-
guard let signature = signature else { fatalError() }
147-
// Verify signature
148-
let signatureError = self.verifySignature(signature, data: message, objectId: objectId, algorithm: algorithm)
149-
if signatureError != nil {
150-
YubiKitManager.shared.stopNFCConnection(withErrorMessage: String(localized: "Invalid signature", comment: "PIV extension invalid signature"))
151-
completion(.communicationError(ErrorMessage(title: String(localized: "Invalid signature", comment: "PIV extension invalid signature"),
152-
text: String(localized: "The private key on the YubiKey does not match the certificate.", comment: "PIV extension invalid signature message"))))
153-
return
154-
}
155-
156-
YubiKitManager.shared.stopNFCConnection(withMessage: String(localized: "Successfully signed data", comment: "PIV extension NFC successfully signed data"))
157-
158-
if let userDefaults = UserDefaults(suiteName: "group.com.yubico.Authenticator") {
159-
Logger.ctk.debug("Save data to userDefaults...")
160-
userDefaults.setValue(signature, forKey: "signedData")
161-
completion(nil)
162-
}
163-
} // End signWithKey Session
164-
case .decryptData:
165-
// Begin Decryption Session
166-
session.decryptWithKey(in: slot, algorithm: algorithm, encrypted: message) { plainText, error in
167-
// Handle any errors
168-
if let error = error, (error as NSError).code == 0x6a80 {
169-
YubiKitManager.shared.stopNFCConnection(withErrorMessage: String(localized: "Invalid decryption", comment: "PIV extension NFC invalid decryption"))
170-
completion(.communicationError(ErrorMessage(title: String(localized: "Invalid decryption", comment: "PIV extension NFC invalid decryption"),
171-
text: String(localized: "The private key on the YubiKey does not match the certificate or there is no private key stored on the YubiKey.", comment: "PIV extension NFC invalid decryption no private key"))))
172-
return
173-
}
174-
if let error = error {
175-
completion(.communicationError(ErrorMessage(title: String(localized: "Decryption failed", comment: "PIV extension decryption failed error message"), text: error.localizedDescription)))
176-
return
177-
}
178-
179-
guard let plainText = plainText else { fatalError() }
180-
181-
YubiKitManager.shared.stopNFCConnection(withMessage: String(localized: "Successfully decrypted cipher data", comment: "PIV extension NFC successfully decrypted cipher data"))
182-
183-
if let userDefaults = UserDefaults(suiteName: "group.com.yubico.Authenticator") {
184-
Logger.ctk.debug("Save decrypted data to userDefaults...")
185-
186-
if let decryptedRawString = String(data: plainText, encoding: .utf8) {
187-
// Injecting Yubico Authenticator watermark message for testing to confirm the decrypted message came via YA app
188-
//let decryptedYAString = "[Decrypted using YA] " + decryptedRawString
189-
190-
if let decryptedYAStringAsData = decryptedRawString.data(using: .utf8) {
191-
userDefaults.setValue(decryptedYAStringAsData, forKey: "decryptedData")
192-
}
193-
}
194-
completion(nil)
195-
}
196-
} // End Decryption Session
130+
session.signWithKey(in: slot, type: type, algorithm: algorithm, message: message) { signature, error in
131+
// Handle any errors
132+
if let error = error, (error as NSError).code == 0x6a80 {
133+
YubiKitManager.shared.stopNFCConnection(withErrorMessage: String(localized: "Invalid signature", comment: "PIV extension NFC invalid signature"))
134+
completion(.communicationError(ErrorMessage(title: String(localized: "Invalid signature", comment: "PIV extension NFC invalid signature"),
135+
text: String(localized: "The private key on the YubiKey does not match the certificate or there is no private key stored on the YubiKey.", comment: "PIV extension NFC invalid signature no private key"))))
136+
return
137+
}
138+
if let error = error {
139+
completion(.communicationError(ErrorMessage(title: String(localized: "Signing failed", comment: "PIV extension signing failed error message"), text: error.localizedDescription)))
140+
return
141+
}
142+
guard let signature = signature else { fatalError() }
143+
// Verify signature
144+
let signatureError = self.verifySignature(signature, data: message, objectId: objectId, algorithm: algorithm)
145+
if signatureError != nil {
146+
YubiKitManager.shared.stopNFCConnection(withErrorMessage: String(localized: "Invalid signature", comment: "PIV extension invalid signature"))
147+
completion(.communicationError(ErrorMessage(title: String(localized: "Invalid signature", comment: "PIV extension invalid signature"),
148+
text: String(localized: "The private key on the YubiKey does not match the certificate.", comment: "PIV extension invalid signature message"))))
149+
return
150+
}
151+
152+
YubiKitManager.shared.stopNFCConnection(withMessage: String(localized: "Successfully signed data", comment: "PIV extension NFC successfully signed data"))
153+
154+
if let userDefaults = UserDefaults(suiteName: "group.com.yubico.Authenticator") {
155+
Logger.ctk.debug("Save data to userDefaults...")
156+
userDefaults.setValue(signature, forKey: "signedData")
157+
completion(nil)
158+
}
197159
}
198160
}
199161
}
@@ -224,11 +186,6 @@ class TokenRequestViewModel: NSObject {
224186
}
225187
}
226188

227-
enum OperationType: String {
228-
case signData = "signData"
229-
case decryptData = "decryptData"
230-
}
231-
232189

233190
extension TokenRequestViewModel {
234191

@@ -343,11 +300,6 @@ private extension Dictionary where Key == AnyHashable, Value: Any {
343300
guard let rawValue = self["algorithm"] as? String else { return nil }
344301
return SecKeyAlgorithm(rawValue: rawValue as CFString)
345302
}
346-
347-
func operationType() -> OperationType? {
348-
guard let rawValue = self["operationType"] as? String else { return nil }
349-
return OperationType.init(rawValue: rawValue)
350-
}
351303
}
352304

353305
extension String: Error {}

Authenticator/UI/Authentication/AddCredential/mul.lproj/AddCredential.xcstrings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"fr" : {
165165
"stringUnit" : {
166166
"state" : "translated",
167-
"value" : "Ajouter compte"
167+
"value" : "Ajouter un compte"
168168
}
169169
},
170170
"ja" : {

0 commit comments

Comments
 (0)