Move handshake message handling functions from ssl_both.c to client/server.
authorjsing <jsing@openbsd.org>
Sat, 1 Oct 2022 16:23:15 +0000 (16:23 +0000)
committerjsing <jsing@openbsd.org>
Sat, 1 Oct 2022 16:23:15 +0000 (16:23 +0000)
commiteb1ff9efeeafce819f37ee97f33409efd97d77d6
tree00f695c533f6ec99c783a4348bfaddfd1748bc07
parentab24605b91dab04bc8b81c3f9b811b6de4f77f48
Move handshake message handling functions from ssl_both.c to client/server.

Currently, ssl_both.c contains several functions that are used by both the
legacy client and legacy server. This interwines the client and server,
making it harder to make progressive changes. While it does deduplicate
some code, it also ends up with code that is conditioned on s->server and
forces the caller to pass in SSL3_ST_* values.

Move these functions from ssl_both.c into ssl_clnt.c and ssl_srvr.c,
renaming as appropriate and removing the s->server conditionals. Also move
the client and server function prototypes from ssl_locl.h into the .c
files, making them static in the process.

ok tb@
lib/libssl/ssl_both.c
lib/libssl/ssl_clnt.c
lib/libssl/ssl_locl.h
lib/libssl/ssl_srvr.c