mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user