From 44677c01aefe099a77b9d534833e9024b1fa3450 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Fri, 5 Jul 2019 20:37:17 -0500 Subject: [PATCH] hxtool print: fix output device bugs --- lib/hx509/cert.c | 2 +- lib/hx509/hxtool.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hx509/cert.c b/lib/hx509/cert.c index 2c657331f..e5b488d10 100644 --- a/lib/hx509/cert.c +++ b/lib/hx509/cert.c @@ -3685,7 +3685,7 @@ hx509_print_cert(hx509_context context, hx509_cert cert, FILE *out) free(str); } - printf(" keyusage: "); + fprintf(out, " keyusage: "); ret = hx509_cert_keyusage_print(context, cert, &str); if (ret == 0) { fprintf(out, "%s\n", str); diff --git a/lib/hx509/hxtool.c b/lib/hx509/hxtool.c index 8cdf82ece..372afe609 100644 --- a/lib/hx509/hxtool.c +++ b/lib/hx509/hxtool.c @@ -669,7 +669,7 @@ print_certificate(hx509_context hxcontext, hx509_cert cert, int verbose) printf(" private key: %s\n", _hx509_cert_private_key(cert) ? "yes" : "no"); - ret = hx509_print_cert(hxcontext, cert, NULL); + ret = hx509_print_cert(hxcontext, cert, stdout); if (ret) errx(1, "failed to print cert");