aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/Model
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-10-25 06:58:14 +0530
committerRoopesh Chander <roop@roopc.net>2018-10-27 15:13:02 +0530
commit11876574979e42b18824f65cc64522431bcd4f1d (patch)
tree342e53e7884beb7fb24ca7f94494e6713fbcf36e /WireGuard/WireGuard/Model
parentInfo.plist: support for opening wg-quick config (.conf) files (diff)
downloadwireguard-apple-11876574979e42b18824f65cc64522431bcd4f1d.tar.xz
wireguard-apple-11876574979e42b18824f65cc64522431bcd4f1d.zip
Model: Allow creating an interface with empty name
But don't allow such a tunnel to be added to the tunnel manager. (We'll need to create an interface with an empty name when we're reading QR codes.) Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/Model')
-rw-r--r--WireGuard/WireGuard/Model/Configuration.swift1
1 files changed, 0 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/Model/Configuration.swift b/WireGuard/WireGuard/Model/Configuration.swift
index 8ef93e6..4bed41b 100644
--- a/WireGuard/WireGuard/Model/Configuration.swift
+++ b/WireGuard/WireGuard/Model/Configuration.swift
@@ -28,7 +28,6 @@ struct InterfaceConfiguration: Codable {
init(name: String, privateKey: Data) {
self.name = name
self.privateKey = privateKey
- if (name.isEmpty) { fatalError("Empty name") }
if (privateKey.count != 32) { fatalError("Invalid private key") }
}
}