]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Disable server address validation on interop handshake test
authorNeil Horman <nhorman@openssl.org>
Wed, 4 Dec 2024 14:33:30 +0000 (09:33 -0500)
committerNeil Horman <nhorman@openssl.org>
Mon, 17 Feb 2025 16:27:33 +0000 (11:27 -0500)
The handshake test in the interop suite requires that no server address
validation be preformed, so disable it for this test

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26114)

demos/guide/quic-hq-interop-server.c
test/quic-openssl-docker/run_endpoint.sh

index 3f28a0ec97ad9a5a7b2d797c011241b246aabd1b..df3864fcebfa7b3ba24b06cff819152a6edc6850 100644 (file)
@@ -33,6 +33,7 @@
  *   Defaults to "./downloads" if not set.
  * - SSLKEYLOGFILE: specifies that keylogging should be preformed on the server
  *   should be set to a file name to record keylog data to
+ * - NO_ADDR_VALIDATE: Disables server address validation of clients
  *
  */
 
@@ -491,13 +492,21 @@ static int run_quic_server(SSL_CTX *ctx, BIO *sock)
     int ok = 0;
     SSL *listener, *conn, *stream;
     unsigned long errcode;
+    uint64_t flags = 0;
+
+    /*
+     * If NO_ADDR_VALIDATE exists in our environment
+     * then disable address validation on our listener
+     */
+    if (getenv("NO_ADDR_VALIDATE") != NULL)
+        flags |= SSL_LISTENER_FLAG_NO_VALIDATE;
 
     /*
      * Create a new QUIC listener. Listeners, and other QUIC objects, default
      * to operating in blocking mode. The configured behaviour is inherited by
      * child objects.
      */
-    if ((listener = SSL_new_listener(ctx, 0)) == NULL)
+    if ((listener = SSL_new_listener(ctx, flags)) == NULL)
         goto err;
 
     /* Provide the listener with our UDP socket. */
index e8729c30dd4793c7247b8eb477aa976138134c15..829825de7adde7f0088df2b71ecbc3586af429dd 100644 (file)
@@ -88,7 +88,10 @@ elif [ "$ROLE" == "server" ]; then
     echo "TESTCASE is $TESTCASE"
     rm -f $CURLRC 
     case "$TESTCASE" in
-    "handshake"|"transfer"|"retry"|"resumption")
+    "handshake")
+        NO_ADDR_VALIDATE=yes SSLKEYLOGFILE=/logs/keys.log FILEPREFIX=/www quic-hq-interop-server 443 /certs/cert.pem /certs/priv.key
+        ;;
+    "transfer"|"retry"|"resumption")
        SSLKEYLOGFILE=/logs/keys.log FILEPREFIX=/www quic-hq-interop-server 443 /certs/cert.pem /certs/priv.key
         ;;
     "chacha20")