summaryrefslogtreecommitdiffstats
path: root/ssl/statem
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2022-06-24 16:45:14 +0100
committerMatt Caswell <matt@openssl.org>2022-08-18 16:38:13 +0100
commitbfc0f10d0640fddbe63c0828389247691ab617f0 (patch)
treeba486a741ac5825b1ad00678cc25c8e9f937712d /ssl/statem
parent7a15ed64fa5387dfbf1db391b84ddc7b1bf25571 (diff)
Remove some remaining SSL object references from DTLS record layer
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18132)
Diffstat (limited to 'ssl/statem')
-rw-r--r--ssl/statem/statem.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c
index d3ac21d357..ed27d27bce 100644
--- a/ssl/statem/statem.c
+++ b/ssl/statem/statem.c
@@ -123,7 +123,7 @@ void ossl_statem_clear(SSL_CONNECTION *s)
{
s->statem.state = MSG_FLOW_UNINITED;
s->statem.hand_state = TLS_ST_BEFORE;
- s->statem.in_init = 1;
+ ossl_statem_set_in_init(s, 1);
s->statem.no_cert_verify = 0;
}
@@ -132,7 +132,7 @@ void ossl_statem_clear(SSL_CONNECTION *s)
*/
void ossl_statem_set_renegotiate(SSL_CONNECTION *s)
{
- s->statem.in_init = 1;
+ ossl_statem_set_in_init(s, 1);
s->statem.request_state = TLS_ST_SW_HELLO_REQ;
}
@@ -141,7 +141,7 @@ void ossl_statem_send_fatal(SSL_CONNECTION *s, int al)
/* We shouldn't call SSLfatal() twice. Once is enough */
if (s->statem.in_init && s->statem.state == MSG_FLOW_ERROR)
return;
- s->statem.in_init = 1;
+ ossl_statem_set_in_init(s, 1);
s->statem.state = MSG_FLOW_ERROR;
if (al != SSL_AD_NO_ALERT
&& s->statem.enc_write_state != ENC_WRITE_STATE_INVALID)
@@ -196,6 +196,8 @@ int ossl_statem_in_error(const SSL_CONNECTION *s)
void ossl_statem_set_in_init(SSL_CONNECTION *s, int init)
{
s->statem.in_init = init;
+ if (s->rrlmethod != NULL && s->rrlmethod->set_in_init != NULL)
+ s->rrlmethod->set_in_init(s->rrl, init);
}
int ossl_statem_get_in_handshake(SSL_CONNECTION *s)
@@ -270,7 +272,7 @@ void ossl_statem_check_finish_init(SSL_CONNECTION *s, int sending)
void ossl_statem_set_hello_verify_done(SSL_CONNECTION *s)
{
s->statem.state = MSG_FLOW_UNINITED;
- s->statem.in_init = 1;
+ ossl_statem_set_in_init(s, 1);
/*
* This will get reset (briefly) back to TLS_ST_BEFORE when we enter
* state_machine() because |state| is MSG_FLOW_UNINITED, but until then any