summaryrefslogtreecommitdiff
path: root/ssl/statem
diff options
context:
space:
mode:
authorslontis <shane.lontis@oracle.com>2022-10-12 16:03:08 +1000
committerHugo Landau <hlandau@openssl.org>2022-10-18 12:19:23 +0100
commit846975f367f75f3503b44c12e49d980dca181647 (patch)
tree13dd5a013da371a160a498b21af434633f421b56 /ssl/statem
parent7d3600a6c906c5f4cf81db95aec7b58b9d018c49 (diff)
downloadopenssl-new-846975f367f75f3503b44c12e49d980dca181647.tar.gz
Fix sctp compile errors
Fixes #19371 running config with 'enable-sctp' gave compiler errors. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19398)
Diffstat (limited to 'ssl/statem')
-rw-r--r--ssl/statem/statem.c5
-rw-r--r--ssl/statem/statem.h1
-rw-r--r--ssl/statem/statem_srvr.c2
3 files changed, 7 insertions, 1 deletions
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);
}
}