Skip to content

Commit

Permalink
Refuse to start the client without keyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
angt committed Dec 18, 2015
1 parent 1ab854f commit 38b7333
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

1 comment on commit 38b7333

@jedisct1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o

Please sign in to comment.