mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-12 01:26:48 +08:00
DTLS-Rekey time is set to be the 2/3 of cookie validity
This commit is contained in:
+1
-1
@@ -536,7 +536,7 @@ struct cmd_auth_req_st areq;
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
|
||||
ret = tls_printf(ws->session, "Set-Cookie: webvpn=%s\r\n", str_cookie);
|
||||
ret = tls_printf(ws->session, "Set-Cookie: webvpn=%s;Max-Age=%u\r\n", str_cookie, (unsigned)ws->config->cookie_validity);
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
|
||||
|
||||
+1
-1
@@ -634,7 +634,7 @@ unsigned mtu_overhead, dtls_mtu = 0, tls_mtu = 0;
|
||||
ret = tls_printf(ws->session, "X-DTLS-Port: %u\r\n", ws->config->udp_port);
|
||||
SEND_ERR(ret);
|
||||
|
||||
ret = tls_puts(ws->session, "X-DTLS-Rekey-Time: 86400\r\n");
|
||||
ret = tls_printf(ws->session, "X-DTLS-Rekey-Time: %u\r\n", (unsigned)(2*ws->config->cookie_validity)/3);
|
||||
SEND_ERR(ret);
|
||||
|
||||
ret = tls_printf(ws->session, "X-DTLS-Keepalive: %u\r\n", ws->config->keepalive);
|
||||
|
||||
Reference in New Issue
Block a user