Refuse to start the client without keyfile

This commit is contained in:
angt
2015-12-18 16:07:14 +01:00
parent 1ab854f058
commit 38b7333533

View File

@@ -763,8 +763,15 @@ int main (int argc, char **argv)
gt_log("buffer size must be greater than 2048!\n"); gt_log("buffer size must be greater than 2048!\n");
} }
if (!listener && !option_is_set(opts, "retry")) if (!listener) {
retry_count = 0; 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) { if (sodium_init()==-1) {
gt_log("libsodium initialization has failed!\n"); gt_log("libsodium initialization has failed!\n");