summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-02-07 08:54:21 +0000
committerHugo Landau <hlandau@openssl.org>2024-02-08 16:50:01 +0000
commit99a5cfc13a0a8b1ebf51d0193ac78f64a48c87e1 (patch)
tree0308ce8fcb8c290e9a85eeb6b576f06bc51ae3b8 /ssl
parent827475fc8b255f912a90295b3dac5864a0a7614a (diff)
QUIC APL: Move NULL pointer check to quic_impl.c
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23360)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/quic_impl.c4
-rw-r--r--ssl/ssl_lib.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c
index 84214bd5f7..de39a5c7aa 100644
--- a/ssl/quic/quic_impl.c
+++ b/ssl/quic/quic_impl.c
@@ -3300,6 +3300,10 @@ int ossl_quic_get_value_uint(SSL *s, uint32_t class_, uint32_t id,
if (!expect_quic_conn_only(s, &ctx))
return 0;
+ if (value == NULL)
+ return QUIC_RAISE_NON_NORMAL_ERROR(&ctx,
+ ERR_R_PASSED_INVALID_ARGUMENT, NULL);
+
switch (id) {
case SSL_VALUE_QUIC_IDLE_TIMEOUT:
return qc_getset_idle_timeout(&ctx, class_, value, NULL);
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 539d8568f7..7d618bd700 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -7639,11 +7639,6 @@ int SSL_get_conn_close_info(SSL *s, SSL_CONN_CLOSE_INFO *info,
int SSL_get_value_uint(SSL *s, uint32_t class_, uint32_t id,
uint64_t *value)
{
- if (value == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
- return 0;
- }
-
#ifndef OPENSSL_NO_QUIC
if (IS_QUIC(s))
return ossl_quic_get_value_uint(s, class_, id, value);