Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update liboqs library to latest version #441

Merged
merged 4 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion IVPNClient/Managers/AppKeyManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ class AppKeyManager {
var interface = Interface()
interface.privateKey = Interface.generatePrivateKey()
var params = ApiService.authParams + [
URLQueryItem(name: "public_key", value: interface.publicKey ?? "")
URLQueryItem(name: "public_key", value: interface.publicKey ?? ""),
URLQueryItem(name: "kem_library_version", value: "0.10.0")
]

var kem = KEM()
Expand Down
5 changes: 4 additions & 1 deletion IVPNClient/Managers/SessionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ class SessionManager {

private func sessionNewParams(force: Bool = false, username: String? = nil, confirmation: String? = nil, captcha: String? = nil, captchaId: String? = nil, kem: KEM) -> [URLQueryItem] {
let username = username ?? Application.shared.authentication.getStoredUsername()
var params = [URLQueryItem(name: "username", value: username)]
var params = [
URLQueryItem(name: "username", value: username),
URLQueryItem(name: "kem_library_version", value: "0.10.0")
]

if let wgPublicKey = KeyChain.wgPublicKey {
params.append(URLQueryItem(name: "wg_public_key", value: wgPublicKey))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
present(NavigationManager.getLoginViewController(), animated: true)
}

private func showTooManySessionsAlert(error: ErrorResultSessionNew?, isNewStyleAccount: Bool) {

Check warning on line 224 in IVPNClient/Scenes/MainScreen/ControlPanel/ControlPanelViewController+Ext.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Cyclomatic Complexity Violation: Function should have complexity 15 or less: currently complexity equals 31 (cyclomatic_complexity)
let message = "You've reached the maximum number of connected devices"

// Legacy account, Pro plan
Expand Down Expand Up @@ -273,7 +273,7 @@
showActionSheet(title: message, actions: [
"Log out from all devices",
"Visit Device Management",
"Retry",
"Retry"
], cancelAction: "Cancel login", sourceView: self.controlPanelView.connectSwitch) { [self] index in
switch index {
case 0:
Expand All @@ -295,7 +295,7 @@
showActionSheet(title: message, actions: [
"Log out from all devices",
"Enable Device Management",
"Retry",
"Retry"
], cancelAction: "Cancel login", sourceView: self.controlPanelView.connectSwitch) { [self] index in
switch index {
case 0:
Expand Down
4 changes: 2 additions & 2 deletions IVPNClient/Scenes/Signup/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
presentCaptchaScreen(error: error)
}

private func showTooManySessionsAlert(error: ErrorResultSessionNew?, isNewStyleAccount: Bool) {

Check warning on line 384 in IVPNClient/Scenes/Signup/LoginViewController.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Cyclomatic Complexity Violation: Function should have complexity 15 or less: currently complexity equals 31 (cyclomatic_complexity)
let message = "You've reached the maximum number of connected devices"

// Legacy account, Pro plan
Expand Down Expand Up @@ -433,7 +433,7 @@
showActionSheet(title: message, actions: [
"Log out from all devices",
"Visit Device Management",
"Retry",
"Retry"
], cancelAction: "Cancel login", sourceView: self.userName, permittedArrowDirections: [.up]) { [self] index in
switch index {
case 0:
Expand All @@ -455,7 +455,7 @@
showActionSheet(title: message, actions: [
"Log out from all devices",
"Enable Device Management",
"Retry",
"Retry"
], cancelAction: "Cancel login", sourceView: self.userName, permittedArrowDirections: [.up]) { [self] index in
switch index {
case 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ extension NetworkProtectionViewController {
}

override func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
let contextItem = UIContextualAction(style: .destructive, title: "Remove") { (contextualAction, view, boolValue) in
let contextItem = UIContextualAction(style: .destructive, title: "Remove") { (_, _, _) in
self.removeNetwork(indexPath: indexPath)
}
let swipeActions = UISwipeActionsConfiguration(actions: [contextItem])
Expand Down
Loading