summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_server.c
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2020-07-03 04:12:50 +0000
committertb <tb@openbsd.org>2020-07-03 04:12:50 +0000
commit9b8a142f83dc001c0a2f196574f2c6a4c1ab6899 (patch)
tree31f2ee6a0d1b0bf40cf65259e7110fe89a916234 /lib/libssl/tls13_server.c
parenttimecounting: make the dummy counter interrupt- and MP-safe (diff)
downloadwireguard-openbsd-9b8a142f83dc001c0a2f196574f2c6a4c1ab6899.tar.xz
wireguard-openbsd-9b8a142f83dc001c0a2f196574f2c6a4c1ab6899.zip
Improve argument order for the internal tlsext API
Move is_server and msg_type right after the SSL object so that CBS and CBB and alert come last. This brings these functions more in line with other internal functions and separates state from data. requested by jsing
Diffstat (limited to 'lib/libssl/tls13_server.c')
-rw-r--r--lib/libssl/tls13_server.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libssl/tls13_server.c b/lib/libssl/tls13_server.c
index 12601fa33d6..a5c03b610cd 100644
--- a/lib/libssl/tls13_server.c
+++ b/lib/libssl/tls13_server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_server.c,v 1.60 2020/06/25 07:35:05 tb Exp $ */
+/* $OpenBSD: tls13_server.c,v 1.61 2020/07/03 04:12:51 tb Exp $ */
/*
* Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -191,7 +191,7 @@ tls13_client_hello_process(struct tls13_ctx *ctx, CBS *cbs)
goto err;
}
- if (!tlsext_server_parse(s, cbs, &alert_desc, SSL_TLSEXT_MSG_CH)) {
+ if (!tlsext_server_parse(s, SSL_TLSEXT_MSG_CH, cbs, &alert_desc)) {
ctx->alert = alert_desc;
goto err;
}
@@ -330,7 +330,7 @@ tls13_server_hello_build(struct tls13_ctx *ctx, CBB *cbb, int hrr)
goto err;
if (!CBB_add_u8(cbb, 0))
goto err;
- if (!tlsext_server_build(s, cbb, tlsext_msg_type))
+ if (!tlsext_server_build(s, tlsext_msg_type, cbb))
goto err;
if (!CBB_flush(cbb))
@@ -511,7 +511,7 @@ tls13_server_hello_sent(struct tls13_ctx *ctx)
int
tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx, CBB *cbb)
{
- if (!tlsext_server_build(ctx->ssl, cbb, SSL_TLSEXT_MSG_EE))
+ if (!tlsext_server_build(ctx->ssl, SSL_TLSEXT_MSG_EE, cbb))
goto err;
return 1;
@@ -526,7 +526,7 @@ tls13_server_certificate_request_send(struct tls13_ctx *ctx, CBB *cbb)
if (!CBB_add_u8_length_prefixed(cbb, &certificate_request_context))
goto err;
- if (!tlsext_server_build(ctx->ssl, cbb, SSL_TLSEXT_MSG_CR))
+ if (!tlsext_server_build(ctx->ssl, SSL_TLSEXT_MSG_CR, cbb))
goto err;
if (!CBB_flush(cbb))