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>
This commit is contained in:
Roopesh Chander
2018-10-25 06:58:14 +05:30
parent 1c8928c8a1
commit 1187657497
3 changed files with 2 additions and 2 deletions
@@ -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") }
}
}