summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-03-28 08:13:55 +0000
committerHugo Landau <hlandau@openssl.org>2024-04-19 09:31:06 +0100
commit723896e47fe586360f9e728d9d1197c339d8ab81 (patch)
treee2fd63735d2d32e331d14c65817c41f6b5a6ad9c
parent93206d9b7e911c926840dca4cddb7a51dd5b1ab8 (diff)
Minor updates
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23487)
-rw-r--r--doc/designs/quic-design/server/quic-polling.md4
-rw-r--r--ssl/quic/quic_obj_local.h13
-rw-r--r--ssl/ssl_lib.c4
-rw-r--r--ssl/t1_trce.c2
-rw-r--r--test/radix/quic_bindings.c6
-rw-r--r--test/radix/quic_ops.c2
6 files changed, 20 insertions, 11 deletions
diff --git a/doc/designs/quic-design/server/quic-polling.md b/doc/designs/quic-design/server/quic-polling.md
index a7757001a3..802fdf48d7 100644
--- a/doc/designs/quic-design/server/quic-polling.md
+++ b/doc/designs/quic-design/server/quic-polling.md
@@ -408,7 +408,7 @@ issues with this design:
This limitation is intrinsic to the design of `poll(2)` and poll-esque APIs.
It is not necessarily a reason not to offer this rather simple API, as use of
poll(2) and poll(2)-like APIs is widespread and users are likely to appreciate
- an API which does not provide significant impedence discontinuities to
+ an API which does not provide significant impedance discontinuities to
applications which use select/poll, even if those applications suffer impaired
performance as a result.
@@ -1424,7 +1424,7 @@ socket handle and then closes it. What happens?**
Since OSes in general do not provide a way to get notified of these closures it
is not really possible to handle this automatically. It is essential that an
-application deregister the handle from the poll group first.
+application deregisters the handle from the poll group first.
**Q. How does code using a poll method determine what poll descriptors that
method supports?**
diff --git a/ssl/quic/quic_obj_local.h b/ssl/quic/quic_obj_local.h
index d0cfa4165b..fa5b33f265 100644
--- a/ssl/quic/quic_obj_local.h
+++ b/ssl/quic/quic_obj_local.h
@@ -30,7 +30,7 @@
*
* The QUIC_OBJ is a base type for QUIC APL objects which provides functionality
* common to all QUIC objects and which supports having different APL objects
- * dynamically assume leader roles. It can therefore be seen as an extention of
+ * dynamically assume leader roles. It can therefore be seen as an extension of
* the SSL base class and extends the SSL object for QUIC APL objects. This
* avoids duplication of functionality for different types of QUIC object and
* allows access to common responsibilities of different types of APL object
@@ -64,8 +64,8 @@
*
* This structure must come at the start of a QUIC object structure definition.
*
- * ssl->type still determines the actual object type. An SSL object pointer s
- * can be safely cast to (QUIC_OBJ *) iff IS_QUIC(s) is true.
+ * ssl->type still determines the actual object type. An SSL object
+ * pointer s can be safely cast to (QUIC_OBJ *) iff IS_QUIC(s) is true.
*/
struct quic_obj_st {
/* SSL object common header. */
@@ -106,6 +106,11 @@ struct quic_obj_st {
};
/*
+ * Core Functions and Inlines
+ * ==========================
+ */
+
+/*
* Initialises a QUIC_OBJ structure with zero or more roles active. Returns 1
* on success or 0 on failure.
*
@@ -217,6 +222,8 @@ ossl_quic_obj_get0_port_local(const QUIC_OBJ *obj)
/*
* Convenience Inlines
* ===================
+ *
+ * These inlines are expressed in terms of the core functions and inlines above.
*/
/* Get a pointer to the QUIC domain mutex. Always returns non-NULL. */
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index d1f83a68f4..483a4ec3a5 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -7484,11 +7484,11 @@ SSL *SSL_get0_listener(SSL *s)
{
#ifndef OPENSSL_NO_QUIC
if (!IS_QUIC(s))
- return s;
+ return NULL;
return ossl_quic_get0_listener(s);
#else
- return s;
+ return NULL;
#endif
}
diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c
index 5b54c919c0..9edb32f3dc 100644
--- a/ssl/t1_trce.c
+++ b/ssl/t1_trce.c
@@ -14,9 +14,7 @@
/* Packet trace support for OpenSSL */
#include "internal/nelem.h"
#include "internal/ssl_unwrap.h"
-#include "internal/quic_predef.h"
#include "internal/quic_trace.h"
-#include "quic/quic_local.h"
typedef struct {
int num;
diff --git a/test/radix/quic_bindings.c b/test/radix/quic_bindings.c
index 03d8e48a8b..f2eb1474cf 100644
--- a/test/radix/quic_bindings.c
+++ b/test/radix/quic_bindings.c
@@ -114,7 +114,11 @@ static RADIX_OBJ *RADIX_OBJ_new(const char *name, SSL *ssl)
if (!TEST_ptr(obj = OPENSSL_zalloc(sizeof(*obj))))
return NULL;
- obj->name = OPENSSL_strdup(name);
+ if (!TEST_ptr(obj->name = OPENSSL_strdup(name))) {
+ OPENSSL_free(obj);
+ return NULL;
+ }
+
obj->ssl = ssl;
return obj;
}
diff --git a/test/radix/quic_ops.c b/test/radix/quic_ops.c
index 0a60176590..955a5cb83f 100644
--- a/test/radix/quic_ops.c
+++ b/test/radix/quic_ops.c
@@ -587,7 +587,7 @@ DEF_FUNC(hf_connect_wait)
goto err;
if (ret != 1) {
- if (1 /* TODO */ && is_want(ssl, ret))
+ if (is_want(ssl, ret))
F_SPIN_AGAIN();
if (!TEST_int_eq(ret, 1))