mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
zeroize cookies and TLS session data after read.
This commit is contained in:
@@ -443,6 +443,10 @@ int handle_commands(main_server_st * s, struct proc_st *proc)
|
||||
|
||||
ret = handle_resume_store_req(s, proc, smsg);
|
||||
|
||||
/* zeroize the data */
|
||||
safe_memset(raw, 0, raw_len);
|
||||
safe_memset(smsg->session_data.data, 0, smsg->session_data.len);
|
||||
|
||||
session_resume_store_req_msg__free_unpacked(smsg, &pa);
|
||||
|
||||
if (ret < 0) {
|
||||
@@ -542,6 +546,9 @@ int handle_commands(main_server_st * s, struct proc_st *proc)
|
||||
|
||||
ret = handle_auth_cookie_req(s, proc, auth_cookie_req);
|
||||
|
||||
safe_memset(raw, 0, raw_len);
|
||||
safe_memset(auth_cookie_req->cookie.data, 0, auth_cookie_req->cookie.len);
|
||||
|
||||
auth_cookie_request_msg__free_unpacked(auth_cookie_req, &pa);
|
||||
|
||||
ret = handle_cookie_auth_res(s, proc, cmd, ret);
|
||||
|
||||
Reference in New Issue
Block a user