mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-01 03:47:23 +03:00
fixed regular_square. Some scan-build tweaks. Made os_port.h "private".
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@181 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
11
ssl/tls1.c
11
ssl/tls1.c
@ -36,6 +36,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "os_port.h"
|
||||
#include "ssl.h"
|
||||
|
||||
/* The session expiry time */
|
||||
@ -1635,9 +1636,13 @@ SSL_SESSION *ssl_session_update(int max_sessions, SSL_SESSION *ssl_sessions[],
|
||||
}
|
||||
|
||||
/* ok, we've used up all of our sessions. So blow the oldest session away */
|
||||
oldest_sess->conn_time = tm;
|
||||
memset(oldest_sess->session_id, 0, sizeof(SSL_SESSION_ID_SIZE));
|
||||
memset(oldest_sess->master_secret, 0, sizeof(SSL_SECRET_SIZE));
|
||||
if (oldest_sess != NULL)
|
||||
{
|
||||
oldest_sess->conn_time = tm;
|
||||
memset(oldest_sess->session_id, 0, sizeof(SSL_SESSION_ID_SIZE));
|
||||
memset(oldest_sess->master_secret, 0, sizeof(SSL_SECRET_SIZE));
|
||||
}
|
||||
|
||||
SSL_CTX_UNLOCK(ssl->ssl_ctx->mutex);
|
||||
return oldest_sess;
|
||||
}
|
||||
|
Reference in New Issue
Block a user