diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/tls13_handshake.c | 24 | ||||
-rw-r--r-- | lib/libssl/tls13_record_layer.c | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/lib/libssl/tls13_handshake.c b/lib/libssl/tls13_handshake.c index 0d3e64dee8f..d324a7f4ba1 100644 --- a/lib/libssl/tls13_handshake.c +++ b/lib/libssl/tls13_handshake.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_handshake.c,v 1.54 2020/04/29 01:16:49 inoguchi Exp $ */ +/* $OpenBSD: tls13_handshake.c,v 1.55 2020/05/02 00:30:55 inoguchi Exp $ */ /* * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> @@ -36,19 +36,19 @@ struct tls13_handshake_action { int (*recv)(struct tls13_ctx *ctx, CBS *cbs); }; -static enum tls13_message_type +static const enum tls13_message_type tls13_handshake_active_state(struct tls13_ctx *ctx); -static struct tls13_handshake_action * +static const struct tls13_handshake_action * tls13_handshake_active_action(struct tls13_ctx *ctx); static int tls13_handshake_advance_state_machine(struct tls13_ctx *ctx); static int tls13_handshake_send_action(struct tls13_ctx *ctx, - struct tls13_handshake_action *action); + const struct tls13_handshake_action *action); static int tls13_handshake_recv_action(struct tls13_ctx *ctx, - struct tls13_handshake_action *action); + const struct tls13_handshake_action *action); -struct tls13_handshake_action state_machine[] = { +static const struct tls13_handshake_action state_machine[] = { [CLIENT_HELLO] = { .handshake_type = TLS13_MT_CLIENT_HELLO, .sender = TLS13_HS_CLIENT, @@ -143,7 +143,7 @@ struct tls13_handshake_action state_machine[] = { }, }; -enum tls13_message_type handshakes[][TLS13_NUM_MESSAGE_TYPES] = { +const enum tls13_message_type handshakes[][TLS13_NUM_MESSAGE_TYPES] = { [INITIAL] = { CLIENT_HELLO, SERVER_HELLO_RETRY_REQUEST, @@ -248,7 +248,7 @@ enum tls13_message_type handshakes[][TLS13_NUM_MESSAGE_TYPES] = { const size_t handshake_count = sizeof(handshakes) / sizeof(handshakes[0]); -static enum tls13_message_type +static const enum tls13_message_type tls13_handshake_active_state(struct tls13_ctx *ctx) { struct tls13_handshake_stage hs = ctx->handshake_stage; @@ -261,7 +261,7 @@ tls13_handshake_active_state(struct tls13_ctx *ctx) return handshakes[hs.hs_type][hs.message_number]; } -static struct tls13_handshake_action * +static const struct tls13_handshake_action * tls13_handshake_active_action(struct tls13_ctx *ctx) { enum tls13_message_type mt = tls13_handshake_active_state(ctx); @@ -293,7 +293,7 @@ tls13_handshake_msg_record(struct tls13_ctx *ctx) int tls13_handshake_perform(struct tls13_ctx *ctx) { - struct tls13_handshake_action *action; + const struct tls13_handshake_action *action; int ret; for (;;) { @@ -324,7 +324,7 @@ tls13_handshake_perform(struct tls13_ctx *ctx) static int tls13_handshake_send_action(struct tls13_ctx *ctx, - struct tls13_handshake_action *action) + const struct tls13_handshake_action *action) { ssize_t ret; CBB cbb; @@ -372,7 +372,7 @@ tls13_handshake_send_action(struct tls13_ctx *ctx, static int tls13_handshake_recv_action(struct tls13_ctx *ctx, - struct tls13_handshake_action *action) + const struct tls13_handshake_action *action) { uint8_t msg_type; ssize_t ret; diff --git a/lib/libssl/tls13_record_layer.c b/lib/libssl/tls13_record_layer.c index dac8fe088d0..0bf1d19d918 100644 --- a/lib/libssl/tls13_record_layer.c +++ b/lib/libssl/tls13_record_layer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_record_layer.c,v 1.31 2020/04/29 01:22:28 inoguchi Exp $ */ +/* $OpenBSD: tls13_record_layer.c,v 1.32 2020/05/02 00:31:54 inoguchi Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> * @@ -166,7 +166,7 @@ tls13_record_layer_rbuf(struct tls13_record_layer *rl, CBS *cbs) CBS_dup(&rl->rbuf_cbs, cbs); } -uint8_t tls13_max_seq_num[TLS13_RECORD_SEQ_NUM_LEN] = { +static const uint8_t tls13_max_seq_num[TLS13_RECORD_SEQ_NUM_LEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; |