Generate a new DTLS session ID on every cookie connection

That allows openconnect to distinguish when the DTLS key has switched.
This commit is contained in:
Nikos Mavrogiannopoulos
2014-11-16 10:00:08 +01:00
parent 01bbb5cfa1
commit 78b3685f7a
3 changed files with 4 additions and 13 deletions

View File

@@ -69,15 +69,6 @@ static int generate_cookie(sec_mod_st * sec, client_entry_st * entry)
{
int ret;
Cookie msg = COOKIE__INIT;
uint8_t session_id[GNUTLS_MAX_SESSION_ID];
ret =
gnutls_rnd(GNUTLS_RND_NONCE, session_id, sizeof(session_id));
if (ret < 0)
return -1;
msg.session_id.data = session_id;
msg.session_id.len = sizeof(session_id);
msg.username = entry->username;
msg.groupname = entry->groupname;