libnm: change nm_wireguard_peer_set_public_key() API to allow validation

This is an API break since 1.16-rc1.

Similar to previous commit.

(cherry picked from commit 7962653918)
This commit is contained in:
Thomas Haller
2019-03-01 15:52:19 +01:00
parent 7682826229
commit 6452d2d0e5
5 changed files with 30 additions and 15 deletions

View File

@@ -343,7 +343,7 @@ def do_set(nm_client, conn, argv):
else:
peer_idx = None
peer = NM.WireGuardPeer()
peer.set_public_key(public_key)
peer.set_public_key(public_key, True)
wg_peer_is_valid(peer, 'public key "%s" is invalid' % (public_key))
peer_remove = False
idx += 2