summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_srvr.c
diff options
context:
space:
mode:
authorjsing <>2018-11-08 20:26:45 +0000
committerjsing <>2018-11-08 20:26:45 +0000
commitb86f3c2d93eb7700d5516638d5374023390b256c (patch)
treeafba855729c2565be464917c7f34130c8d592ceb /src/lib/libssl/ssl_srvr.c
parent1eab3dd975d9eaf8a08418b8aad5d4ae781c0cea (diff)
downloadopenbsd-b86f3c2d93eb7700d5516638d5374023390b256c.tar.gz
openbsd-b86f3c2d93eb7700d5516638d5374023390b256c.tar.bz2
openbsd-b86f3c2d93eb7700d5516638d5374023390b256c.zip
Ensure the handshake transcript is cleaned up.
Add a check at the completion of the client/server handshake to ensure that the handshake transcript has been freed. Fix the case where a server asks the client for a certificate, but it does not have one, resulting in the handshake transcript being left around post-handshake. ok bcook@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_srvr.c')
-rw-r--r--src/lib/libssl/ssl_srvr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c
index e046438cc0..f077140b90 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.48 2018/08/27 17:04:34 jsing Exp $ */ 1/* $OpenBSD: ssl_srvr.c,v 1.49 2018/11/08 20:26:45 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 *
@@ -707,6 +707,12 @@ ssl3_accept(SSL *s)
707 /* clean a few things up */ 707 /* clean a few things up */
708 tls1_cleanup_key_block(s); 708 tls1_cleanup_key_block(s);
709 709
710 if (S3I(s)->handshake_buffer != NULL) {
711 SSLerror(s, ERR_R_INTERNAL_ERROR);
712 ret = -1;
713 goto end;
714 }
715
710 if (!SSL_IS_DTLS(s)) { 716 if (!SSL_IS_DTLS(s)) {
711 BUF_MEM_free(s->internal->init_buf); 717 BUF_MEM_free(s->internal->init_buf);
712 s->internal->init_buf = NULL; 718 s->internal->init_buf = NULL;