hxtool print: fix output device bugs

This commit is contained in:
Nicolas Williams
2019-07-05 20:37:17 -05:00
parent 63ccdca137
commit 44677c01ae
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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");