Limit the number of TLS resumption requests to one.

This commit is contained in:
Nikos Mavrogiannopoulos
2014-05-28 10:32:32 +02:00
parent 3a18882a40
commit e5c60a7a44
2 changed files with 8 additions and 1 deletions

View File

@@ -486,6 +486,13 @@ int handle_commands(main_server_st * s, struct proc_st *proc)
SESSION_RESUME_REPLY_MSG__INIT;
SessionResumeFetchMsg *fmsg;
if (proc->resume_reqs > 0) {
mslog(s, proc, LOG_ERR, "too many resumption requests");
ret = ERR_BAD_COMMAND;
goto cleanup;
}
proc->resume_reqs++;
fmsg =
session_resume_fetch_msg__unpack(&pa, raw_len,
raw);