summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-02-14 09:04:12 +0100
committerTomas Mraz <tomas@openssl.org>2024-02-16 16:15:38 +0100
commit5c16e9d384d1d0f4784352633044610a1f264027 (patch)
treec2c65ee4baa3a3026171bf0082d05d574d31a5c8 /ssl
parentCheck for NULL cleanup function before using it in encoder_process (diff)
downloadopenssl-5c16e9d384d1d0f4784352633044610a1f264027.tar.xz
openssl-5c16e9d384d1d0f4784352633044610a1f264027.zip
QUIC: Fix SSL_ctrl operation for QSSOs
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23581)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index f44a1bfe33..f35bcfc631 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -2906,9 +2906,6 @@ long ossl_ctrl_internal(SSL *s, int cmd, long larg, void *parg, int no_quic)
long l;
SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
- if (sc == NULL)
- return 0;
-
/*
* Routing of ctrl calls for QUIC is a little counterintuitive:
*
@@ -2927,6 +2924,9 @@ long ossl_ctrl_internal(SSL *s, int cmd, long larg, void *parg, int no_quic)
if (!no_quic && IS_QUIC(s))
return s->method->ssl_ctrl(s, cmd, larg, parg);
+ if (sc == NULL)
+ return 0;
+
switch (cmd) {
case SSL_CTRL_GET_READ_AHEAD:
return RECORD_LAYER_get_read_ahead(&sc->rlayer);