From 846975f367f75f3503b44c12e49d980dca181647 Mon Sep 17 00:00:00 2001 From: slontis Date: Wed, 12 Oct 2022 16:03:08 +1000 Subject: Fix sctp compile errors Fixes #19371 running config with 'enable-sctp' gave compiler errors. Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/19398) --- ssl/statem/statem.c | 5 +++++ ssl/statem/statem.h | 1 + ssl/statem/statem_srvr.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'ssl/statem') diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c index 138bca220c..448d655a17 100644 --- a/ssl/statem/statem.c +++ b/ssl/statem/statem.c @@ -116,6 +116,11 @@ int SSL_in_before(const SSL *s) && (sc->statem.state == MSG_FLOW_UNINITED); } +OSSL_HANDSHAKE_STATE ossl_statem_get_state(SSL_CONNECTION *s) +{ + return s != NULL ? s->statem.hand_state : TLS_ST_BEFORE; +} + /* * Clear the state machine state and reset back to MSG_FLOW_UNINITED */ diff --git a/ssl/statem/statem.h b/ssl/statem/statem.h index 167e8a12bf..2b73eba6f6 100644 --- a/ssl/statem/statem.h +++ b/ssl/statem/statem.h @@ -118,6 +118,7 @@ typedef struct ossl_statem_st OSSL_STATEM; __owur int ossl_statem_accept(SSL *s); __owur int ossl_statem_connect(SSL *s); +OSSL_HANDSHAKE_STATE ossl_statem_get_state(SSL_CONNECTION *s); void ossl_statem_clear(SSL_CONNECTION *s); void ossl_statem_set_renegotiate(SSL_CONNECTION *s); void ossl_statem_send_fatal(SSL_CONNECTION *s, int al); diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index bc4a6a362f..ab1574419e 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -3411,7 +3411,7 @@ WORK_STATE tls_post_process_client_key_exchange(SSL_CONNECTION *s, return WORK_ERROR; } - BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY, + BIO_ctrl(s->wbio, BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY, sizeof(sctpauthkey), sctpauthkey); } } -- cgit v1.2.3