summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-16 03:17:12 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-17 19:26:07 +0200
commit73bd1a69cd8543c18899d187f80248cff90fbafa (patch)
tree6196015684438c41c683b457b3dd66e59db2a22e /src/tools
parenttools: retry resolution except when fatal (diff)
downloadwireguard-monolithic-historical-73bd1a69cd8543c18899d187f80248cff90fbafa.tar.xz
wireguard-monolithic-historical-73bd1a69cd8543c18899d187f80248cff90fbafa.zip
tools: don't insist on having a private key
This lets us do flexible things from wg-quick such as: PostUp = wg set %i private-key <(pass WireGuard/private-keys/%i) It also was never a very sensible policy to enforce. Suggested-by: Luis Ressel <aranea@aixah.de>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/config.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/tools/config.c b/src/tools/config.c
index 30e004c..ec16e26 100644
--- a/src/tools/config.c
+++ b/src/tools/config.c
@@ -384,11 +384,6 @@ bool config_read_init(struct config_ctx *ctx, bool append)
struct wgdevice *config_read_finish(struct config_ctx *ctx)
{
struct wgpeer *peer;
- if (ctx->device->flags & WGDEVICE_REPLACE_PEERS && key_is_zero(ctx->device->private_key)) {
- fprintf(stderr, "No private key is configured\n");
- goto err;
- }
-
for_each_wgpeer (ctx->device, peer) {
if (key_is_zero(peer->public_key)) {
fprintf(stderr, "A peer is missing a public key\n");