From: W.C.A. Wijngaards Date: Thu, 22 Jan 2026 13:19:35 +0000 (+0100) Subject: - Fix http test tool petal to not print errors when there is no X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b123d1b78bf3ff5d27804886a09a680e7f3203c;p=thirdparty%2Funbound.git - Fix http test tool petal to not print errors when there is no error. --- diff --git a/doc/Changelog b/doc/Changelog index c282ec21f..bc6eaa2d6 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/testcode/petal.c b/testcode/petal.c index 627c77d57..db6b7f779 100644 --- a/testcode/petal.c +++ b/testcode/petal.c @@ -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))