diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-11-11 12:30:21 +0900 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-11-11 12:30:49 +0900 |
commit | 7a989b36d186e5a22763a61c9541ae202e2c0ba8 (patch) | |
tree | 076386442d229336c840a32f12810748d24d21a6 /src/tools/showconf.c | |
parent | curve25519: reject deriving from NULL private keys (diff) | |
download | wireguard-monolithic-historical-7a989b36d186e5a22763a61c9541ae202e2c0ba8.tar.xz wireguard-monolithic-historical-7a989b36d186e5a22763a61c9541ae202e2c0ba8.zip |
tools: allow for NULL keys everywhere
Diffstat (limited to 'src/tools/showconf.c')
-rw-r--r-- | src/tools/showconf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/showconf.c b/src/tools/showconf.c index 2843910..e780d78 100644 --- a/src/tools/showconf.c +++ b/src/tools/showconf.c @@ -38,7 +38,7 @@ int showconf_main(int argc, char *argv[]) printf("ListenPort = %u\n", device->listen_port); if (device->fwmark) printf("FwMark = 0x%x\n", device->fwmark); - if (!key_is_zero(device->private_key)) { + if (device->flags & WGDEVICE_HAS_PRIVATE_KEY) { key_to_base64(base64, device->private_key); printf("PrivateKey = %s\n", base64); } @@ -46,7 +46,7 @@ int showconf_main(int argc, char *argv[]) for_each_wgpeer(device, peer) { key_to_base64(base64, peer->public_key); printf("[Peer]\nPublicKey = %s\n", base64); - if (!key_is_zero(peer->preshared_key)) { + if (peer->flags & WGPEER_HAS_PRESHARED_KEY) { key_to_base64(base64, peer->preshared_key); printf("PresharedKey = %s\n", base64); } |