summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2021-03-29 16:56:20 +0000
committerjsing <>2021-03-29 16:56:20 +0000
commit79bf381577b952bb4388f9f766c992be782c1c74 (patch)
tree0e8c1ad71b36af9763e76c2ad66ecdd40ea78b30 /src
parentffd3a25f2822ad41040600e98da045f9f9ca96dd (diff)
downloadopenbsd-79bf381577b952bb4388f9f766c992be782c1c74.tar.gz
openbsd-79bf381577b952bb4388f9f766c992be782c1c74.tar.bz2
openbsd-79bf381577b952bb4388f9f766c992be782c1c74.zip
Avoid transcript initialisation when sending a TLS HelloRequest.
When server side renegotiation is triggered, the TLSv1.2 state machine sends a HelloRequest before going to ST_SW_FLUSH and ST_OK. In this case we do not need the transcript and currently hit the sanity check in ST_OK that ensures the transcript has been freed, breaking server initiated renegotiation. We do however need the transcript in the DTLS case. ok tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/ssl_srvr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c
index aea8d67260..0f3572a678 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.100 2021/03/27 17:56:28 tb Exp $ */ 1/* $OpenBSD: ssl_srvr.c,v 1.101 2021/03/29 16:56:20 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 *
@@ -294,9 +294,11 @@ ssl3_accept(SSL *s)
294 S3I(s)->hs.state = SSL3_ST_SW_FLUSH; 294 S3I(s)->hs.state = SSL3_ST_SW_FLUSH;
295 s->internal->init_num = 0; 295 s->internal->init_num = 0;
296 296
297 if (!tls1_transcript_init(s)) { 297 if (SSL_is_dtls(s)) {
298 ret = -1; 298 if (!tls1_transcript_init(s)) {
299 goto end; 299 ret = -1;
300 goto end;
301 }
300 } 302 }
301 break; 303 break;
302 304