summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2020-07-10 10:03:46 +0200
committerAndrej Mihajlov <and@mullvad.net>2020-07-15 14:33:00 +0200
commit97e5d451736e9a320a44f5af1549db29cab87183 (patch)
tree01aa75e6d40db58417c675d7ca8675bd4e300a22
parent70c7ecd75a9b780f22516832811bdc5af5ff606c (diff)
downloadmullvadvpn-97e5d451736e9a320a44f5af1549db29cab87183.tar.xz
mullvadvpn-97e5d451736e9a320a44f5af1549db29cab87183.zip
Fix left overs of "tunnel configuration", replaced with "tunnel settings"
-rw-r--r--ios/MullvadVPN/AutomaticKeyRotationManager.swift4
-rw-r--r--ios/MullvadVPN/TunnelManager.swift10
-rw-r--r--ios/MullvadVPN/TunnelSettingsManager.swift6
-rw-r--r--ios/PacketTunnel/PacketTunnelProvider.swift20
4 files changed, 20 insertions, 20 deletions
diff --git a/ios/MullvadVPN/AutomaticKeyRotationManager.swift b/ios/MullvadVPN/AutomaticKeyRotationManager.swift
index f057914200..1755c6f4af 100644
--- a/ios/MullvadVPN/AutomaticKeyRotationManager.swift
+++ b/ios/MullvadVPN/AutomaticKeyRotationManager.swift
@@ -28,10 +28,10 @@ class AutomaticKeyRotationManager {
/// An RPC failure
case rpc(MullvadRpc.Error)
- /// A failure to read the tunnel configuration
+ /// A failure to read the tunnel settings
case readTunnelSettings(TunnelSettingsManager.Error)
- /// A failure to update tunnel configuration
+ /// A failure to update tunnel settings
case updateTunnelSettings(TunnelSettingsManager.Error)
var errorDescription: String? {
diff --git a/ios/MullvadVPN/TunnelManager.swift b/ios/MullvadVPN/TunnelManager.swift
index f3a5c532e4..65c86aee45 100644
--- a/ios/MullvadVPN/TunnelManager.swift
+++ b/ios/MullvadVPN/TunnelManager.swift
@@ -163,19 +163,19 @@ class TunnelManager {
/// provider configuration is detected.
case removeInconsistentVPNConfiguration(Swift.Error)
- /// A failure to read tunnel configuration
+ /// A failure to read tunnel settings
case readTunnelSettings(TunnelSettingsManager.Error)
- /// A failure to add the tunnel configuration
+ /// A failure to add the tunnel settings
case addTunnelSettings(TunnelSettingsManager.Error)
- /// A failure to update the tunnel configuration
+ /// A failure to update the tunnel settings
case updateTunnelSettings(TunnelSettingsManager.Error)
- /// A failure to remove the tunnel configuration from Keychain
+ /// A failure to remove the tunnel settings from Keychain
case removeTunnelSettings(TunnelSettingsManager.Error)
- /// Unable to obtain the persistent keychain reference for the tunnel configuration
+ /// Unable to obtain the persistent keychain reference for the tunnel settings
case obtainPersistentKeychainReference(TunnelSettingsManager.Error)
/// A failure to push the public WireGuard key
diff --git a/ios/MullvadVPN/TunnelSettingsManager.swift b/ios/MullvadVPN/TunnelSettingsManager.swift
index 6708290e38..c30440324a 100644
--- a/ios/MullvadVPN/TunnelSettingsManager.swift
+++ b/ios/MullvadVPN/TunnelSettingsManager.swift
@@ -20,7 +20,7 @@ enum TunnelSettingsManager {}
extension TunnelSettingsManager {
enum Error: ChainedError {
- /// A failure to encode the given tunnel configuration
+ /// A failure to encode the given tunnel settings
case encode(Swift.Error)
/// A failure to decode the data stored in Keychain
@@ -44,7 +44,7 @@ extension TunnelSettingsManager {
typealias Result<T> = Swift.Result<T, Error>
- /// Keychain access level that should be used for all items containing tunnel configuration
+ /// Keychain access level that should be used for all items containing tunnel settings
private static let keychainAccessibleLevel = Keychain.Accessible.afterFirstUnlock
enum KeychainSearchTerm {
@@ -157,7 +157,7 @@ extension TunnelSettingsManager {
}
}
- /// Reads the tunnel configuration from Keychain, then passes it to the given closure for
+ /// Reads the tunnel settings from Keychain, then passes it to the given closure for
/// modifications, saves the result back to Keychain.
///
/// The given block may run multiple times if Keychain entry was changed between read and write
diff --git a/ios/PacketTunnel/PacketTunnelProvider.swift b/ios/PacketTunnel/PacketTunnelProvider.swift
index c30171e999..167d79a741 100644
--- a/ios/PacketTunnel/PacketTunnelProvider.swift
+++ b/ios/PacketTunnel/PacketTunnelProvider.swift
@@ -18,11 +18,11 @@ enum PacketTunnelProviderError: ChainedError {
/// Failure to satisfy the relay constraint
case noRelaySatisfyingConstraint
- /// Missing the persistent keychain reference to the tunnel configuration
+ /// Missing the persistent keychain reference to the tunnel settings
case missingKeychainConfigurationReference
- /// Failure to read the tunnel configuration from Keychain
- case cannotReadTunnelConfiguration(TunnelSettingsManager.Error)
+ /// Failure to read the tunnel settings from Keychain
+ case cannotReadTunnelSettings(TunnelSettingsManager.Error)
/// Failure to set network settings
case setNetworkSettings(Error)
@@ -47,8 +47,8 @@ enum PacketTunnelProviderError: ChainedError {
case .missingKeychainConfigurationReference:
return "Invalid protocol configuration"
- case .cannotReadTunnelConfiguration:
- return "Failure reading tunnel configuration"
+ case .cannotReadTunnelSettings:
+ return "Failure reading tunnel settings"
case .setNetworkSettings:
return "Failure to set system network settings"
@@ -414,9 +414,9 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
exclusivityController.addOperation(operation, categories: [.exclusive])
}
- /// Returns a `PacketTunnelConfig` that contains the tunnel configuration and selected relay
+ /// Returns a `PacketTunnelConfig` that contains the tunnel settings and selected relay
private class func makePacketTunnelConfig(keychainReference: Data, completionHandler: @escaping (Result<PacketTunnelConfiguration, PacketTunnelProviderError>) -> Void) {
- switch Self.readTunnelConfiguration(keychainReference: keychainReference) {
+ switch Self.readTunnelSettings(keychainReference: keychainReference) {
case .success(let tunnelSettings):
Self.selectRelayEndpoint(relayConstraints: tunnelSettings.relayConstraints) { (result) in
let result = result.map { (selectorResult) -> PacketTunnelConfiguration in
@@ -434,10 +434,10 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
}
}
- /// Read tunnel configuration from Keychain
- private class func readTunnelConfiguration(keychainReference: Data) -> Result<TunnelSettings, PacketTunnelProviderError> {
+ /// Read tunnel settings from Keychain
+ private class func readTunnelSettings(keychainReference: Data) -> Result<TunnelSettings, PacketTunnelProviderError> {
TunnelSettingsManager.load(searchTerm: .persistentReference(keychainReference))
- .mapError { PacketTunnelProviderError.cannotReadTunnelConfiguration($0) }
+ .mapError { PacketTunnelProviderError.cannotReadTunnelSettings($0) }
.map { $0.tunnelSettings }
}