nts: rework NTS-KE retry interval

Make the NTS-KE retry interval exponentially increasing, using a factor
provided by the NKE session. Use shorter intervals when the server is
refusing TCP connections or the connection is closed or timing out
before the TLS handshake.
This commit is contained in:
Miroslav Lichvar
2020-03-25 17:01:27 +01:00
parent bcdbbbd694
commit 66dc2b6d6b
7 changed files with 68 additions and 8 deletions

View File

@@ -80,4 +80,8 @@ extern int NKSN_IsStopped(NKSN_Instance inst);
/* Stop the session */
extern void NKSN_StopSession(NKSN_Instance inst);
/* Get a factor to calculate retry interval (in log2 seconds)
based on the session state or how it was terminated */
extern int NKSN_GetRetryFactor(NKSN_Instance inst);
#endif