aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/ssl_sess.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-04-16 10:06:25 +0100
committerMatt Caswell <matt@openssl.org>2015-08-03 11:01:42 +0100
commit9ceb2426b0a7972434a49a34e78bdcc6437e04ad (patch)
tree6d1cd08357d6108473f14d4a0d60df128eab2262 /ssl/ssl_sess.c
parent6fc2ef20a92a318aa5aacf9c907fa70df98f6a41 (diff)
downloadopenssl-9ceb2426b0a7972434a49a34e78bdcc6437e04ad.tar.gz
PACKETise ClientHello processing
Uses the new PACKET code to process the incoming ClientHello including all extensions etc. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'ssl/ssl_sess.c')
-rw-r--r--ssl/ssl_sess.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 9063bca415..26a3c43f24 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -547,8 +547,8 @@ int ssl_get_new_session(SSL *s, int session)
* - Both for new and resumed sessions, s->tlsext_ticket_expected is set to 1
* if the server should issue a new session ticket (to 0 otherwise).
*/
-int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len,
- const unsigned char *limit)
+int ssl_get_prev_session(SSL *s, PACKET *pkt, unsigned char *session_id,
+ int len)
{
/* This is used only by servers. */
@@ -560,16 +560,11 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len,
if (len < 0 || len > SSL_MAX_SSL_SESSION_ID_LENGTH)
goto err;
- if (session_id + len > limit) {
- fatal = 1;
- goto err;
- }
-
if (len == 0)
try_session_cache = 0;
/* sets s->tlsext_ticket_expected */
- r = tls1_process_ticket(s, session_id, len, limit, &ret);
+ r = tls1_process_ticket(s, pkt, session_id, len, &ret);
switch (r) {
case -1: /* Error during processing */
fatal = 1;