aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-02-06 03:23:51 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-02-06 06:20:23 +0100
commitc005893fe7acf363049c1b342e0c2b7cdf6f096f (patch)
treeee89b91f60bd267c356b0931d72bde9a288c8771 /WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift
parentLegacyConfig: Remove and support plaintext for .mobileconfig (diff)
downloadwireguard-apple-c005893fe7acf363049c1b342e0c2b7cdf6f096f.tar.xz
wireguard-apple-c005893fe7acf363049c1b342e0c2b7cdf6f096f.zip
PrivateDataConfirmation: prompt with touch/face/pin/password ID for viewing/exporting keys
Diffstat (limited to 'WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift')
-rw-r--r--WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift b/WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift
index bdc17ac..7345794 100644
--- a/WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift
+++ b/WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift
@@ -41,7 +41,7 @@ extension NETunnelProviderProtocol {
// until finally the app is open. Would it be possible to call saveToPreferences here? Or is
// that generally not available to network extensions? In which case, what should our
// behavior be?
-
+
guard let passwordReference = passwordReference else { return nil }
guard let config = Keychain.openReference(called: passwordReference) else { return nil }
return try? TunnelConfiguration(fromWgQuickConfig: config, called: name)
@@ -56,7 +56,7 @@ extension NETunnelProviderProtocol {
guard let ref = passwordReference else { return nil }
return Keychain.verifyReference(called: ref) ? ref : nil
}
-
+
@discardableResult
func migrateConfigurationIfNeeded(called name: String) -> Bool {
/* This is how we did things before we switched to putting items