Config file parser: Fix typo

This commit is contained in:
Roopesh Chander 2018-11-17 22:52:37 +05:30
parent b5689edf71
commit ccd8e784f3
1 changed files with 1 additions and 1 deletions

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
}