diff options
| author | tb <> | 2024-12-04 07:58:51 +0000 |
|---|---|---|
| committer | tb <> | 2024-12-04 07:58:51 +0000 |
| commit | 21793083e671ae6b658135da2658a6ee82ae1e3e (patch) | |
| tree | 95613f76deb55fd3f9dab7f96464aa3632d13aa1 /src | |
| parent | ded6e7374797af99a483f44cf2704c07df4ace4c (diff) | |
| download | openbsd-21793083e671ae6b658135da2658a6ee82ae1e3e.tar.gz openbsd-21793083e671ae6b658135da2658a6ee82ae1e3e.tar.bz2 openbsd-21793083e671ae6b658135da2658a6ee82ae1e3e.zip | |
Fix debug output for http headers
from Kenjiro Nakayama
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.sbin/ocspcheck/ocspcheck.c | 9 |
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); |
