diff options
author | tb <> | 2020-07-03 04:12:51 +0000 |
---|---|---|
committer | tb <> | 2020-07-03 04:12:51 +0000 |
commit | 19ec1b6acc3e3c1c1156d9578424119a3a98dd63 (patch) | |
tree | ccbfc5a18a8593e33c9c504671e7d32e7f8e6c1a /src/lib/libssl/tls13_lib.c | |
parent | ba5d20ce0e8a0f27f37d05f5e9e4457b8712655d (diff) | |
download | openbsd-19ec1b6acc3e3c1c1156d9578424119a3a98dd63.tar.gz openbsd-19ec1b6acc3e3c1c1156d9578424119a3a98dd63.tar.bz2 openbsd-19ec1b6acc3e3c1c1156d9578424119a3a98dd63.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 'src/lib/libssl/tls13_lib.c')
-rw-r--r-- | src/lib/libssl/tls13_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/tls13_lib.c b/src/lib/libssl/tls13_lib.c index b5939aecab..8fef39a12f 100644 --- a/src/lib/libssl/tls13_lib.c +++ b/src/lib/libssl/tls13_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_lib.c,v 1.51 2020/06/06 01:40:09 beck Exp $ */ | 1 | /* $OpenBSD: tls13_lib.c,v 1.52 2020/07/03 04:12:51 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> |
4 | * Copyright (c) 2019 Bob Beck <beck@openbsd.org> | 4 | * Copyright (c) 2019 Bob Beck <beck@openbsd.org> |
@@ -415,7 +415,7 @@ tls13_ctx_free(struct tls13_ctx *ctx) | |||
415 | 415 | ||
416 | int | 416 | int |
417 | tls13_cert_add(struct tls13_ctx *ctx, CBB *cbb, X509 *cert, | 417 | tls13_cert_add(struct tls13_ctx *ctx, CBB *cbb, X509 *cert, |
418 | int(*build_extensions)(SSL *s, CBB *cbb, uint16_t msg_type)) | 418 | int(*build_extensions)(SSL *s, uint16_t msg_type, CBB *cbb)) |
419 | { | 419 | { |
420 | CBB cert_data; | 420 | CBB cert_data; |
421 | uint8_t *data; | 421 | uint8_t *data; |
@@ -431,7 +431,7 @@ tls13_cert_add(struct tls13_ctx *ctx, CBB *cbb, X509 *cert, | |||
431 | if (i2d_X509(cert, &data) != cert_len) | 431 | if (i2d_X509(cert, &data) != cert_len) |
432 | return 0; | 432 | return 0; |
433 | if (build_extensions != NULL) { | 433 | if (build_extensions != NULL) { |
434 | if (!build_extensions(ctx->ssl, cbb, SSL_TLSEXT_MSG_CT)) | 434 | if (!build_extensions(ctx->ssl, SSL_TLSEXT_MSG_CT, cbb)) |
435 | return 0; | 435 | return 0; |
436 | } else { | 436 | } else { |
437 | CBB cert_exts; | 437 | CBB cert_exts; |