aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/ipc.c')
-rw-r--r--src/tools/ipc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/ipc.c b/src/tools/ipc.c
index 64ea9e5..b0cb376 100644
--- a/src/tools/ipc.c
+++ b/src/tools/ipc.c
@@ -1010,12 +1010,12 @@ static int openbsd_get_device(struct wgdevice **device, const char *interface)
dev->flags |= WGDEVICE_HAS_LISTEN_PORT;
}
- if (!IS_NULL_KEY(wgs.gs_pubkey)) {
+ if (!IS_NULL_KEY(wgs.gs_pubkey) || IS_MASKED_KEY(wgs.gs_pubkey)) {
memcpy(dev->public_key, wgs.gs_pubkey, WG_KEY_SIZE);
dev->flags |= WGDEVICE_HAS_PUBLIC_KEY;
}
- if (!IS_NULL_KEY(wgs.gs_privkey)) {
+ if (!IS_NULL_KEY(wgs.gs_privkey) || IS_MASKED_KEY(wgs.gs_privkey)) {
memcpy(dev->private_key, wgs.gs_privkey, WG_KEY_SIZE);
dev->flags |= WGDEVICE_HAS_PRIVATE_KEY;
}
@@ -1046,7 +1046,7 @@ static int openbsd_get_device(struct wgdevice **device, const char *interface)
peer->flags |= WGPEER_HAS_PUBLIC_KEY;
}
- if (!IS_NULL_KEY(wgp.gp_psk)) {
+ if (!IS_NULL_KEY(wgp.gp_psk) || IS_MASKED_KEY(wgp.gp_psk)) {
memcpy(peer->preshared_key, wgp.gp_psk, WG_KEY_SIZE);
peer->flags |= WGPEER_HAS_PRESHARED_KEY;
}