aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/TunnelViewModel.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-10-24 12:26:21 +0530
committerRoopesh Chander <roop@roopc.net>2018-10-27 15:13:01 +0530
commit8f4875caf0a5db7616ce7b41e8e302ad38368617 (patch)
tree47aea19b48ec5105a0bacaf8be086248d850135d /WireGuard/WireGuard/UI/TunnelViewModel.swift
parentModel: Interface: Add a public key computed property (diff)
downloadwireguard-apple-8f4875caf0a5db7616ce7b41e8e302ad38368617.tar.xz
wireguard-apple-8f4875caf0a5db7616ce7b41e8e302ad38368617.zip
Tunnel view model: Populate interface's public key
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI/TunnelViewModel.swift')
-rw-r--r--WireGuard/WireGuard/UI/TunnelViewModel.swift1
1 files changed, 1 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift
index d5ff112..b28abeb 100644
--- a/WireGuard/WireGuard/UI/TunnelViewModel.swift
+++ b/WireGuard/WireGuard/UI/TunnelViewModel.swift
@@ -61,6 +61,7 @@ class TunnelViewModel {
guard let config = validatedConfiguration else { return }
scratchpad[.name] = config.name
scratchpad[.privateKey] = config.privateKey.base64EncodedString()
+ scratchpad[.publicKey] = config.publicKey.base64EncodedString()
if (!config.addresses.isEmpty) {
scratchpad[.addresses] = config.addresses.map { $0.stringRepresentation() }.joined(separator: ", ")
}