summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_srvr.c
diff options
context:
space:
mode:
authorjsing <>2019-01-18 00:54:42 +0000
committerjsing <>2019-01-18 00:54:42 +0000
commit66af95e693522ba3868191014eaca1fa0a95176d (patch)
treebcaae6c0e0f49e2bff1aa790059cf07ac8b504e5 /src/lib/libssl/ssl_srvr.c
parent154e80a0b5a0c3c4a9d3390a220e96f0f8c36aab (diff)
downloadopenbsd-66af95e693522ba3868191014eaca1fa0a95176d.tar.gz
openbsd-66af95e693522ba3868191014eaca1fa0a95176d.tar.bz2
openbsd-66af95e693522ba3868191014eaca1fa0a95176d.zip
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@
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/ssl_srvr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c
index 80199d3f2e..afc7c94de8 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.62 2018/12/07 07:22:09 tb Exp $ */ 1/* $OpenBSD: ssl_srvr.c,v 1.63 2019/01/18 00:54:42 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 *
@@ -1019,7 +1019,7 @@ ssl3_get_client_hello(SSL *s)
1019 goto f_err; 1019 goto f_err;
1020 } 1020 }
1021 1021
1022 if (!tlsext_clienthello_parse(s, &cbs, &al)) { 1022 if (!tlsext_server_parse(s, &cbs, &al, SSL_TLSEXT_MSG_CH)) {
1023 SSLerror(s, SSL_R_PARSE_TLSEXT); 1023 SSLerror(s, SSL_R_PARSE_TLSEXT);
1024 goto f_err; 1024 goto f_err;
1025 } 1025 }
@@ -1206,7 +1206,7 @@ ssl3_send_server_hello(SSL *s)
1206 goto err; 1206 goto err;
1207 1207
1208 /* TLS extensions */ 1208 /* TLS extensions */
1209 if (!tlsext_serverhello_build(s, &server_hello)) { 1209 if (!tlsext_server_build(s, &server_hello, SSL_TLSEXT_MSG_SH)) {
1210 SSLerror(s, ERR_R_INTERNAL_ERROR); 1210 SSLerror(s, ERR_R_INTERNAL_ERROR);
1211 goto err; 1211 goto err;
1212 } 1212 }