mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
wireguard: Fix issues with newline in public key when adding client
- This does not effect the existing flow much but is a problem when waiting for the public key to show up in list of peers. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
c99f35ad0e
commit
fa5c5706be
@ -165,7 +165,7 @@ def delete_connections():
|
|||||||
def _get_public_key_from_private_key(private_key):
|
def _get_public_key_from_private_key(private_key):
|
||||||
process = subprocess.run(['wg', 'pubkey'], check=True, capture_output=True,
|
process = subprocess.run(['wg', 'pubkey'], check=True, capture_output=True,
|
||||||
input=private_key.encode())
|
input=private_key.encode())
|
||||||
return process.stdout.decode()
|
return process.stdout.decode().strip()
|
||||||
|
|
||||||
|
|
||||||
def _generate_private_key():
|
def _generate_private_key():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user