Config file parser: Fix typo

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2018-11-17 22:52:37 +05:30
parent 6bb25782c1
commit ef2012330f

View File

@ -66,7 +66,7 @@ class WgQuickConfigFileParser {
guard let publicKey = Data(base64Encoded: publicKeyString), publicKey.count == 32 else { return nil }
var peer = PeerConfiguration(publicKey: publicKey)
// wg fields
if let preSharedKeyString = attributes["PreSharedKey"] {
if let preSharedKeyString = attributes["PresharedKey"] {
guard let preSharedKey = Data(base64Encoded: preSharedKeyString), preSharedKey.count == 32 else { return nil }
peer.preSharedKey = preSharedKey
}