improve pretty printing in print and query
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18022 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -431,12 +431,11 @@ print_certificate(hx509_context hxcontext, hx509_cert cert, int verbose)
|
|||||||
{
|
{
|
||||||
const char *fn = hx509_cert_get_friendly_name(cert);
|
const char *fn = hx509_cert_get_friendly_name(cert);
|
||||||
if (fn)
|
if (fn)
|
||||||
printf(" friendly name: %s", fn);
|
printf(" friendly name: %s\n", fn);
|
||||||
if (_hx509_cert_private_key(cert))
|
printf(" private key: %s\n",
|
||||||
printf(" (have private key)");
|
_hx509_cert_private_key(cert) ? "yes" : "no");
|
||||||
|
|
||||||
}
|
}
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
ret = hx509_cert_get_issuer(cert, &name);
|
ret = hx509_cert_get_issuer(cert, &name);
|
||||||
hx509_name_to_string(name, &str);
|
hx509_name_to_string(name, &str);
|
||||||
@@ -695,7 +694,7 @@ query(struct query_options *opt, int argc, char **argv)
|
|||||||
ret = hx509_certs_find(context, certs, q, &c);
|
ret = hx509_certs_find(context, certs, q, &c);
|
||||||
hx509_query_free(context, q);
|
hx509_query_free(context, q);
|
||||||
if (ret)
|
if (ret)
|
||||||
warnx("hx509_certs_find: %d", ret);
|
printf("no match found (%d)\n", ret);
|
||||||
else {
|
else {
|
||||||
printf("match found\n");
|
printf("match found\n");
|
||||||
if (opt->print_flag)
|
if (opt->print_flag)
|
||||||
|
Reference in New Issue
Block a user