summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinoguchi <>2020-04-29 01:16:49 +0000
committerinoguchi <>2020-04-29 01:16:49 +0000
commitc18c986abbe66711d3b3ed873f7dde63d0573969 (patch)
tree67e131bdff2d9387875f86674c6a2e0d1d3fc9e3
parent8c08e264e3278f882edf60eb3f157388941a16ee (diff)
downloadopenbsd-c18c986abbe66711d3b3ed873f7dde63d0573969.tar.gz
openbsd-c18c986abbe66711d3b3ed873f7dde63d0573969.tar.bz2
openbsd-c18c986abbe66711d3b3ed873f7dde63d0573969.zip
tls13_handshake internal functions to static in libssl
ok jsing@ tb@
-rw-r--r--src/lib/libssl/tls13_handshake.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c
index 86046144de..0d3e64dee8 100644
--- a/src/lib/libssl/tls13_handshake.c
+++ b/src/lib/libssl/tls13_handshake.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_handshake.c,v 1.53 2020/04/22 17:05:07 jsing Exp $ */ 1/* $OpenBSD: tls13_handshake.c,v 1.54 2020/04/29 01:16:49 inoguchi Exp $ */
2/* 2/*
3 * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org>
4 * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> 4 * Copyright (c) 2019 Joel Sing <jsing@openbsd.org>
@@ -36,15 +36,16 @@ struct tls13_handshake_action {
36 int (*recv)(struct tls13_ctx *ctx, CBS *cbs); 36 int (*recv)(struct tls13_ctx *ctx, CBS *cbs);
37}; 37};
38 38
39enum tls13_message_type tls13_handshake_active_state(struct tls13_ctx *ctx); 39static enum tls13_message_type
40 tls13_handshake_active_state(struct tls13_ctx *ctx);
40 41
41struct tls13_handshake_action * 42static struct tls13_handshake_action *
42 tls13_handshake_active_action(struct tls13_ctx *ctx); 43 tls13_handshake_active_action(struct tls13_ctx *ctx);
43int tls13_handshake_advance_state_machine(struct tls13_ctx *ctx); 44static int tls13_handshake_advance_state_machine(struct tls13_ctx *ctx);
44 45
45int tls13_handshake_send_action(struct tls13_ctx *ctx, 46static int tls13_handshake_send_action(struct tls13_ctx *ctx,
46 struct tls13_handshake_action *action); 47 struct tls13_handshake_action *action);
47int tls13_handshake_recv_action(struct tls13_ctx *ctx, 48static int tls13_handshake_recv_action(struct tls13_ctx *ctx,
48 struct tls13_handshake_action *action); 49 struct tls13_handshake_action *action);
49 50
50struct tls13_handshake_action state_machine[] = { 51struct tls13_handshake_action state_machine[] = {
@@ -247,7 +248,7 @@ enum tls13_message_type handshakes[][TLS13_NUM_MESSAGE_TYPES] = {
247 248
248const size_t handshake_count = sizeof(handshakes) / sizeof(handshakes[0]); 249const size_t handshake_count = sizeof(handshakes) / sizeof(handshakes[0]);
249 250
250enum tls13_message_type 251static enum tls13_message_type
251tls13_handshake_active_state(struct tls13_ctx *ctx) 252tls13_handshake_active_state(struct tls13_ctx *ctx)
252{ 253{
253 struct tls13_handshake_stage hs = ctx->handshake_stage; 254 struct tls13_handshake_stage hs = ctx->handshake_stage;
@@ -260,7 +261,7 @@ tls13_handshake_active_state(struct tls13_ctx *ctx)
260 return handshakes[hs.hs_type][hs.message_number]; 261 return handshakes[hs.hs_type][hs.message_number];
261} 262}
262 263
263struct tls13_handshake_action * 264static struct tls13_handshake_action *
264tls13_handshake_active_action(struct tls13_ctx *ctx) 265tls13_handshake_active_action(struct tls13_ctx *ctx)
265{ 266{
266 enum tls13_message_type mt = tls13_handshake_active_state(ctx); 267 enum tls13_message_type mt = tls13_handshake_active_state(ctx);
@@ -271,7 +272,7 @@ tls13_handshake_active_action(struct tls13_ctx *ctx)
271 return &state_machine[mt]; 272 return &state_machine[mt];
272} 273}
273 274
274int 275static int
275tls13_handshake_advance_state_machine(struct tls13_ctx *ctx) 276tls13_handshake_advance_state_machine(struct tls13_ctx *ctx)
276{ 277{
277 if (++ctx->handshake_stage.message_number >= TLS13_NUM_MESSAGE_TYPES) 278 if (++ctx->handshake_stage.message_number >= TLS13_NUM_MESSAGE_TYPES)
@@ -321,7 +322,7 @@ tls13_handshake_perform(struct tls13_ctx *ctx)
321 } 322 }
322} 323}
323 324
324int 325static int
325tls13_handshake_send_action(struct tls13_ctx *ctx, 326tls13_handshake_send_action(struct tls13_ctx *ctx,
326 struct tls13_handshake_action *action) 327 struct tls13_handshake_action *action)
327{ 328{
@@ -369,7 +370,7 @@ tls13_handshake_send_action(struct tls13_ctx *ctx,
369 return TLS13_IO_SUCCESS; 370 return TLS13_IO_SUCCESS;
370} 371}
371 372
372int 373static int
373tls13_handshake_recv_action(struct tls13_ctx *ctx, 374tls13_handshake_recv_action(struct tls13_ctx *ctx,
374 struct tls13_handshake_action *action) 375 struct tls13_handshake_action *action)
375{ 376{