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

@@ -56,6 +56,10 @@
#define NKE_MAX_COOKIES 8
#define NKE_MAX_KEY_LENGTH SIV_MAX_KEY_LENGTH
#define NKE_RETRY_FACTOR2_CONNECT 4
#define NKE_RETRY_FACTOR2_TLS 10
#define NKE_MAX_RETRY_INTERVAL2 19
typedef struct {
int length;
unsigned char key[NKE_MAX_KEY_LENGTH];