From c181c81fb01592ad1d49ebf7afa9676c41a32aaf Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 27 Mar 2021 17:56:28 +0000 Subject: Garbage collect s->internal->type This variable is used in the legacy stack to decide whether we are a server or a client. That's what s->server is for... The new TLSv1.3 stack failed to set s->internal->type, which resulted in hilarious mishandling of previous_{client,server}_finished. Indeed, both client and server would first store the client's verify_data in previous_server_finished and later overwrite it with the server's verify_data. Consequently, renegotiation has been completely broken for more than a year. In fact, server side renegotiation was broken during the 6.5 release cycle. Clearly, no-one uses this. This commit fixes client side renegotiation and restores the previous behavior of SSL_get_client_CA_list(). Server side renegotiation will be fixed in a later commit. ok jsing --- src/lib/libssl/ssl_lib.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/lib/libssl/ssl_lib.c') diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index e3e0c974af..c77fdd77e9 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.252 2021/03/24 18:44:00 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.253 2021/03/27 17:56:28 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -186,8 +186,6 @@ SSL_clear(SSL *s) return (0); } - s->internal->type = 0; - s->version = s->method->internal->version; s->client_version = s->version; s->internal->rwstate = SSL_NOTHING; @@ -2494,7 +2492,6 @@ SSL_dup(SSL *s) goto err; ret->version = s->version; - ret->internal->type = s->internal->type; ret->method = s->method; if (s->session != NULL) { -- cgit v1.2.3-55-g6feb