summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-12-04 07:58:51 +0000
committertb <>2024-12-04 07:58:51 +0000
commitde658ff5e766edba762492289b6ff694e38322c5 (patch)
tree95613f76deb55fd3f9dab7f96464aa3632d13aa1 /src
parentefdd7d53acef8602b3d5a578a00b2506318a43a6 (diff)
downloadopenbsd-de658ff5e766edba762492289b6ff694e38322c5.tar.gz
openbsd-de658ff5e766edba762492289b6ff694e38322c5.tar.bz2
openbsd-de658ff5e766edba762492289b6ff694e38322c5.zip
Fix debug output for http headers
from Kenjiro Nakayama
Diffstat (limited to 'src')
-rw-r--r--src/usr.sbin/ocspcheck/ocspcheck.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/usr.sbin/ocspcheck/ocspcheck.c b/src/usr.sbin/ocspcheck/ocspcheck.c
index 9739e398e8..ae4b8364f6 100644
--- a/src/usr.sbin/ocspcheck/ocspcheck.c
+++ b/src/usr.sbin/ocspcheck/ocspcheck.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocspcheck.c,v 1.33 2024/03/24 11:30:12 beck Exp $ */ 1/* $OpenBSD: ocspcheck.c,v 1.34 2024/12/04 07:58:51 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2017,2020 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2017,2020 Bob Beck <beck@openbsd.org>
@@ -556,8 +556,7 @@ main(int argc, char **argv)
556 struct source sources[MAX_SERVERS_DNS]; 556 struct source sources[MAX_SERVERS_DNS];
557 int i, ch, staplefd = -1, infd = -1, nonce = 1; 557 int i, ch, staplefd = -1, infd = -1, nonce = 1;
558 ocsp_request *request = NULL; 558 ocsp_request *request = NULL;
559 size_t rescount, httphsz = 0, instaplesz = 0; 559 size_t rescount, instaplesz = 0;
560 struct httphead *httph = NULL;
561 struct httpget *hget; 560 struct httpget *hget;
562 X509_STORE *castore; 561 X509_STORE *castore;
563 ssize_t written, w; 562 ssize_t written, w;
@@ -682,8 +681,8 @@ main(int argc, char **argv)
682 } 681 }
683 682
684 dspew("Server at %s returns:\n", host); 683 dspew("Server at %s returns:\n", host);
685 for (i = 0; i < httphsz; i++) 684 for (i = 0; i < hget->headsz; i++)
686 dspew(" [%s]=[%s]\n", httph[i].key, httph[i].val); 685 dspew(" [%s]=[%s]\n", hget->head[i].key, hget->head[i].val);
687 dspew(" [Body]=[%zu bytes]\n", hget->bodypartsz); 686 dspew(" [Body]=[%zu bytes]\n", hget->bodypartsz);
688 if (hget->bodypartsz <= 0) 687 if (hget->bodypartsz <= 0)
689 errx(1, "No body in reply from %s", host); 688 errx(1, "No body in reply from %s", host);