]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl-quic: check results better
authorStefan Eissing <stefan@eissing.org>
Thu, 25 Sep 2025 09:49:45 +0000 (11:49 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 25 Sep 2025 12:07:56 +0000 (14:07 +0200)
Fail on errors from SSL_handle_events().
Force quit Caddy test instance that is left hanging longer with
openssl-quic tests for unknown reasons.

Reported in Joshua's sarif data

Closes #18720

lib/vquic/curl_osslq.c
tests/http/testenv/caddy.py

index 5e9b0727360bb65c8cc2a47c9fd4acbf58a7aae3..b4cc052ec243095ceaf72bfa676a66cf8d003949 100644 (file)
@@ -1421,12 +1421,16 @@ static CURLcode cf_progress_ingress(struct Curl_cfilter *cf,
     if(!snew)
       break;
 
-    (void)cf_osslq_h3conn_add_stream(&ctx->h3, snew, cf, data);
+    result = cf_osslq_h3conn_add_stream(&ctx->h3, snew, cf, data);
+    if(result)
+      goto out;
   }
 
   if(!SSL_handle_events(ctx->tls.ossl.ssl)) {
     int detail = SSL_get_error(ctx->tls.ossl.ssl, 0);
     result = cf_osslq_ssl_err(cf, data, detail, CURLE_RECV_ERROR);
+    if(result)
+      goto out;
   }
 
   if(ctx->h3.conn) {
index ad56ce13c86bf9c74306ed92f32b0410f38d82fd..d7f6a0d7291a8c6d9b0365ad54104a3e842a382e 100644 (file)
@@ -117,7 +117,10 @@ class Caddy:
         self._mkpath(self._tmp_dir)
         if self._process:
             self._process.terminate()
-            self._process.wait(timeout=2)
+            try:
+                self._process.wait(timeout=1)
+            except Exception:
+                self._process.kill()
             self._process = None
             return not wait_dead or self.wait_dead(timeout=timedelta(seconds=5))
         return True