summaryrefslogtreecommitdiff
path: root/src/ocsptool.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-03-23 22:46:16 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-03-23 22:46:18 +0100
commite95d7d1aca6f5e078f354c22b85d961ded8e16a1 (patch)
tree8d39f305a4c4728cc23ac9afcefd12c787aa253c /src/ocsptool.c
parentd5f1158d04927a1e9c205a0f4f5e61d6540b6380 (diff)
downloadgnutls-e95d7d1aca6f5e078f354c22b85d961ded8e16a1.tar.gz
ocsptool: Allow saving responses even if verification fails
In addition do not enter a spurious newline to responses.
Diffstat (limited to 'src/ocsptool.c')
-rw-r--r--src/ocsptool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ocsptool.c b/src/ocsptool.c
index 5da1b3de3b..bb50330b9d 100644
--- a/src/ocsptool.c
+++ b/src/ocsptool.c
@@ -495,7 +495,6 @@ static void ask_server(const char *url)
}
_response_info(&resp_data);
- fprintf(outfile, "\n");
if (HAVE_OPT(LOAD_TRUST)) {
v = _verify_response(&resp_data, n, NULL);
@@ -508,9 +507,10 @@ static void ask_server(const char *url)
v = _verify_response(&resp_data, n, issuer);
}
- if (HAVE_OPT(OUTFILE) && v == 0) {
+ if (HAVE_OPT(OUTFILE) && (v == 0 || HAVE_OPT(IGNORE_ERRORS))) {
fwrite(resp_data.data, 1, resp_data.size, outfile);
}
+
}
int main(int argc, char **argv)