diff options
author | Roopesh Chander <roop@roopc.net> | 2018-10-25 06:58:14 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-10-27 15:13:02 +0530 |
commit | 11876574979e42b18824f65cc64522431bcd4f1d (patch) | |
tree | 342e53e7884beb7fb24ca7f94494e6713fbcf36e /WireGuard/WireGuard/Model | |
parent | Info.plist: support for opening wg-quick config (.conf) files (diff) | |
download | wireguard-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.swift | 1 |
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") } } } |