summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_srvr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_srvr.c')
-rw-r--r--src/lib/libssl/ssl_srvr.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c
index 3551ee41ee..15768bb565 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.90 2021/01/26 14:22:20 jsing Exp $ */ 1/* $OpenBSD: ssl_srvr.c,v 1.91 2021/02/07 15:04:10 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 *
@@ -213,19 +213,12 @@ ssl3_accept(SSL *s)
213 if (cb != NULL) 213 if (cb != NULL)
214 cb(s, SSL_CB_HANDSHAKE_START, 1); 214 cb(s, SSL_CB_HANDSHAKE_START, 1);
215 215
216 if (SSL_is_dtls(s)) { 216 if (!ssl_legacy_stack_version(s, s->version)) {
217 if ((s->version & 0xff00) != (DTLS1_VERSION & 0xff00)) { 217 SSLerror(s, ERR_R_INTERNAL_ERROR);
218 SSLerror(s, ERR_R_INTERNAL_ERROR); 218 ret = -1;
219 ret = -1; 219 goto end;
220 goto end;
221 }
222 } else {
223 if ((s->version >> 8) != 3) {
224 SSLerror(s, ERR_R_INTERNAL_ERROR);
225 ret = -1;
226 goto end;
227 }
228 } 220 }
221
229 s->internal->type = SSL_ST_ACCEPT; 222 s->internal->type = SSL_ST_ACCEPT;
230 223
231 if (!ssl3_setup_init_buffer(s)) { 224 if (!ssl3_setup_init_buffer(s)) {