nts: warn if server started without ntsdumpdir
If an NTS server is configured without ntsdumpdir, keys will not be saved and reloaded after restart, which will cause existing cookies to be invalidated and can cause a short-term denial of service if the server has so many clients that it cannot handle them all making an NTS-KE session within one polling interval. Log a warning message if a server key+certificate is specified without ntsdumpdir.
This commit is contained in:
parent
5a39074e01
commit
6f5df7e4a4
1 changed files with 5 additions and 0 deletions
|
@ -821,6 +821,11 @@ NKS_Initialise(void)
|
||||||
key_delay = key_rotation_interval - (SCH_GetLastEventMonoTime() - last_server_key_ts);
|
key_delay = key_rotation_interval - (SCH_GetLastEventMonoTime() - last_server_key_ts);
|
||||||
SCH_AddTimeoutByDelay(MAX(key_delay, 0.0), key_timeout, NULL);
|
SCH_AddTimeoutByDelay(MAX(key_delay, 0.0), key_timeout, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Warn if keys are not saved, which can cause a flood of requests
|
||||||
|
after server restart */
|
||||||
|
if (!CNF_GetNtsDumpDir())
|
||||||
|
LOG(LOGS_WARN, "No ntsdumpdir to save server keys");
|
||||||
}
|
}
|
||||||
|
|
||||||
initialised = 1;
|
initialised = 1;
|
||||||
|
|
Loading…
Reference in a new issue