nts: explicitly disable session tickets
Session tickets should never be enabled with the currect code on both clients and servers. Set the GNUTLS_NO_TICKETS flag when opening a TLS session in case this understanding is wrong, or it changes in future, to reduce the TLS attack surface.
This commit is contained in:
parent
4cf6b29397
commit
892636036a
1 changed files with 2 additions and 1 deletions
|
@ -217,7 +217,8 @@ create_tls_session(int server_mode, int sock_fd, const char *server_name,
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = gnutls_init(&session, GNUTLS_NONBLOCK | (server_mode ? GNUTLS_SERVER : GNUTLS_CLIENT));
|
r = gnutls_init(&session, GNUTLS_NONBLOCK | GNUTLS_NO_TICKETS |
|
||||||
|
(server_mode ? GNUTLS_SERVER : GNUTLS_CLIENT));
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
LOG(LOGS_ERR, "Could not %s TLS session : %s", "create", gnutls_strerror(r));
|
LOG(LOGS_ERR, "Could not %s TLS session : %s", "create", gnutls_strerror(r));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue