From 4a91b4654c78d359cb9e0cc479b358b673046f5d Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 23 Jan 2019 23:29:56 +0000 Subject: 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 --- src/lib/libssl/tls13_handshake.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c index 5863b0363b..f9cb3e5b47 100644 --- a/src/lib/libssl/tls13_handshake.c +++ b/src/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 * Copyright (c) 2019 Joel Sing @@ -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; -- cgit v1.2.3-55-g6feb