]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix http test tool petal to not print errors when there is no
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 22 Jan 2026 13:19:35 +0000 (14:19 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 22 Jan 2026 13:19:35 +0000 (14:19 +0100)
  error.

doc/Changelog
testcode/petal.c

index c282ec21f62464a05d70f536f9b4316efc6a959e..bc6eaa2d63f7455d51b1edf73954e4970ab4bb6d 100644 (file)
@@ -1,6 +1,8 @@
 22 January 2026: Wouter
        - Fix that fast reload copies the iter_scrub_ns, iter_scrub_cname
          and max_global_quota options.
+       - Fix http test tool petal to not print errors when there is no
+         error.
 
 21 January 2026: Wouter
        - Merge #1388: QNX Porting support for unbound.
index 627c77d575290e341e37af595476bb75eb281314..db6b7f77983e2113f794ad4165475318a330ad13 100644 (file)
@@ -222,7 +222,8 @@ read_http_headers(SSL* ssl, char* file, size_t flen, char* host, size_t hlen,
                if(verb>=2) printf("read: %s\n", buf);
                if(buf[0] == 0) {
                        int e = ERR_peek_error();
-                       printf("error string: %s\n", ERR_reason_error_string(e));
+                       if(e)
+                               printf("error string: %s\n", ERR_reason_error_string(e));
                        return 1;
                }
                if(!process_one_header(buf, file, flen, host, hlen, vs))
@@ -246,7 +247,8 @@ setup_ctx(char* key, char* cert)
 #endif
        if(!SSL_CTX_use_certificate_chain_file(ctx, cert)) {
                int e = ERR_peek_error();
-               printf("error string: %s\n", ERR_reason_error_string(e));
+               if(e)
+                       printf("error string: %s\n", ERR_reason_error_string(e));
                print_exit("cannot read cert");
        }
        if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM))