From 66af95e693522ba3868191014eaca1fa0a95176d Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 18 Jan 2019 00:54:42 +0000 Subject: Rename TLS extension handling to use less "hello". When the TLS extension code was rewritten, TLS extensions could only exist in ClientHello and ServerHello messages - as such, they were named in pairs of *_clienthello_{needs,build} which would be called by the client and *_clienthello_parse. Likewise for *_serverhello_{needs,build} which would be called by a server and *_serverhello_parse, which would be called by a client. Enter TLSv1.3 - TLS extensions can now exist in one of seven messages, with only certain types being allowed to appear in each, meaning the naming scheme no longer works. Instead, rename them to indicate the caller rather than the message type - this effectively means: clienthello_needs -> client_needs clienthello_build -> client_build clienthello_parse -> server_parse serverhello_needs -> server_needs serverhello_build -> server_build serverhello_parse -> client_parse ok beck@ tb@ --- src/lib/libssl/ssl_clnt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/libssl/ssl_clnt.c') diff --git a/src/lib/libssl/ssl_clnt.c b/src/lib/libssl/ssl_clnt.c index 60983fc6fd..acc48389c0 100644 --- a/src/lib/libssl/ssl_clnt.c +++ b/src/lib/libssl/ssl_clnt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_clnt.c,v 1.51 2018/11/29 06:21:09 tb Exp $ */ +/* $OpenBSD: ssl_clnt.c,v 1.52 2019/01/18 00:54:42 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -775,7 +775,7 @@ ssl3_send_client_hello(SSL *s) goto err; /* TLS extensions */ - if (!tlsext_clienthello_build(s, &client_hello)) { + if (!tlsext_client_build(s, &client_hello, SSL_TLSEXT_MSG_CH)) { SSLerror(s, ERR_R_INTERNAL_ERROR); goto err; } @@ -999,7 +999,7 @@ ssl3_get_server_hello(SSL *s) goto f_err; } - if (!tlsext_serverhello_parse(s, &cbs, &al)) { + if (!tlsext_client_parse(s, &cbs, &al, SSL_TLSEXT_MSG_SH)) { SSLerror(s, SSL_R_PARSE_TLSEXT); goto f_err; } -- cgit v1.2.3-55-g6feb