diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2019-01-23 23:29:57 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2019-01-23 23:29:57 +0000 |
commit | a4864e51acbf4d5e891b436eb32d3bc16b5cc32b (patch) | |
tree | 19e925462e2359b57808bb7b3a5bf243537ccb1a /lib/libssl/tls13_handshake.c | |
parent | 7da68dca8e4d93d76eaeada2c394fe3d524940ce (diff) |
Rename NUM_HANDSHAKE to handshake_count and make it a variable
so it can be used from regress. Update regress accordingly.
Make sure the print target generates the entire table as it
currently is in tls13_handshake.c
discussed with beck and jsing
ok jsing
Diffstat (limited to 'lib/libssl/tls13_handshake.c')
-rw-r--r-- | lib/libssl/tls13_handshake.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libssl/tls13_handshake.c b/lib/libssl/tls13_handshake.c index 5863b0363be..f9cb3e5b476 100644 --- a/lib/libssl/tls13_handshake.c +++ b/lib/libssl/tls13_handshake.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_handshake.c,v 1.21 2019/01/23 11:11:52 tb Exp $ */ +/* $OpenBSD: tls13_handshake.c,v 1.22 2019/01/23 23:29:56 tb Exp $ */ /* * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> @@ -246,14 +246,14 @@ enum tls13_message_type handshakes[][TLS13_NUM_MESSAGE_TYPES] = { }, }; -#define NUM_HANDSHAKES (sizeof(handshakes) / sizeof(handshakes[0])) +const size_t handshake_count = sizeof(handshakes) / sizeof(handshakes[0]); enum tls13_message_type tls13_handshake_active_state(struct tls13_ctx *ctx) { struct tls13_handshake_stage hs = ctx->handshake_stage; - if (hs.hs_type >= NUM_HANDSHAKES) + if (hs.hs_type >= handshake_count) return INVALID; if (hs.message_number >= TLS13_NUM_MESSAGE_TYPES) return INVALID; |