From 38b7333533880a5196e4e5261142d25a675861aa Mon Sep 17 00:00:00 2001 From: angt Date: Fri, 18 Dec 2015 16:07:14 +0100 Subject: [PATCH] Refuse to start the client without keyfile --- src/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 840ac11..39370c5 100644 --- a/src/main.c +++ b/src/main.c @@ -763,8 +763,15 @@ int main (int argc, char **argv) gt_log("buffer size must be greater than 2048!\n"); } - if (!listener && !option_is_set(opts, "retry")) - retry_count = 0; + if (!listener) { + if (!option_is_set(opts, "keyfile")) { + gt_log("keyfile option must be set\n"); + return 1; + } + + if (!option_is_set(opts, "retry")) + retry_count = 0; + } if (sodium_init()==-1) { gt_log("libsodium initialization has failed!\n");