From de658ff5e766edba762492289b6ff694e38322c5 Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 4 Dec 2024 07:58:51 +0000 Subject: Fix debug output for http headers from Kenjiro Nakayama --- src/usr.sbin/ocspcheck/ocspcheck.c | 9 ++++----- 1 file 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 @@ -/* $OpenBSD: ocspcheck.c,v 1.33 2024/03/24 11:30:12 beck Exp $ */ +/* $OpenBSD: ocspcheck.c,v 1.34 2024/12/04 07:58:51 tb Exp $ */ /* * Copyright (c) 2017,2020 Bob Beck @@ -556,8 +556,7 @@ main(int argc, char **argv) struct source sources[MAX_SERVERS_DNS]; int i, ch, staplefd = -1, infd = -1, nonce = 1; ocsp_request *request = NULL; - size_t rescount, httphsz = 0, instaplesz = 0; - struct httphead *httph = NULL; + size_t rescount, instaplesz = 0; struct httpget *hget; X509_STORE *castore; ssize_t written, w; @@ -682,8 +681,8 @@ main(int argc, char **argv) } dspew("Server at %s returns:\n", host); - for (i = 0; i < httphsz; i++) - dspew(" [%s]=[%s]\n", httph[i].key, httph[i].val); + for (i = 0; i < hget->headsz; i++) + dspew(" [%s]=[%s]\n", hget->head[i].key, hget->head[i].val); dspew(" [Body]=[%zu bytes]\n", hget->bodypartsz); if (hget->bodypartsz <= 0) errx(1, "No body in reply from %s", host); -- cgit v1.2.3-55-g6feb