diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_srvr.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c index b9b2c58705..f06491e558 100644 --- a/src/lib/libssl/ssl_srvr.c +++ b/src/lib/libssl/ssl_srvr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_srvr.c,v 1.44 2018/08/24 17:44:22 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_srvr.c,v 1.45 2018/08/24 18:10:25 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -818,7 +818,6 @@ ssl3_get_client_hello(SSL *s) | |||
| 818 | unsigned long alg_k; | 818 | unsigned long alg_k; |
| 819 | const SSL_METHOD *method; | 819 | const SSL_METHOD *method; |
| 820 | uint16_t shared_version; | 820 | uint16_t shared_version; |
| 821 | unsigned char *end; | ||
| 822 | 821 | ||
| 823 | /* | 822 | /* |
| 824 | * We do this so that we will respond with our native type. | 823 | * We do this so that we will respond with our native type. |
| @@ -842,8 +841,6 @@ ssl3_get_client_hello(SSL *s) | |||
| 842 | if (n < 0) | 841 | if (n < 0) |
| 843 | goto err; | 842 | goto err; |
| 844 | 843 | ||
| 845 | end = (unsigned char *)s->internal->init_msg + n; | ||
| 846 | |||
| 847 | CBS_init(&cbs, s->internal->init_msg, n); | 844 | CBS_init(&cbs, s->internal->init_msg, n); |
| 848 | 845 | ||
| 849 | /* Parse client hello up until the extensions (if any). */ | 846 | /* Parse client hello up until the extensions (if any). */ |
| @@ -928,10 +925,12 @@ ssl3_get_client_hello(SSL *s) | |||
| 928 | if (!ssl_get_new_session(s, 1)) | 925 | if (!ssl_get_new_session(s, 1)) |
| 929 | goto err; | 926 | goto err; |
| 930 | } else { | 927 | } else { |
| 931 | /* XXX - pass CBS through instead... */ | 928 | CBS ext_block; |
| 932 | i = ssl_get_prev_session(s, | 929 | |
| 933 | (unsigned char *)CBS_data(&session_id), | 930 | CBS_dup(&cbs, &ext_block); |
| 934 | CBS_len(&session_id), end); | 931 | |
| 932 | i = ssl_get_prev_session(s, CBS_data(&session_id), | ||
| 933 | CBS_len(&session_id), &ext_block); | ||
| 935 | if (i == 1) { /* previous session */ | 934 | if (i == 1) { /* previous session */ |
| 936 | s->internal->hit = 1; | 935 | s->internal->hit = 1; |
| 937 | } else if (i == -1) | 936 | } else if (i == -1) |
