summaryrefslogtreecommitdiff
path: root/src/danetool.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-11-01 22:48:11 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-11-01 22:48:11 +0100
commit4fd86806bdb42743bd2a96f9c3138ee1a3ee3a6e (patch)
tree1bdabd940caa570b74b38d8df8bda8551f7dad1f /src/danetool.c
parent91dd6004d7725a35e5fed730447fbf3f2e3093ec (diff)
downloadgnutls-4fd86806bdb42743bd2a96f9c3138ee1a3ee3a6e.tar.gz
optimized printing
Diffstat (limited to 'src/danetool.c')
-rw-r--r--src/danetool.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/danetool.c b/src/danetool.c
index f7736ed4a9..a6622968f9 100644
--- a/src/danetool.c
+++ b/src/danetool.c
@@ -207,18 +207,19 @@ size_t size;
if (ret < 0)
error (EXIT_FAILURE, 0, "dane_query_data: %s", dane_strerror (ret));
- printf("\nCertificate usage: %s\n", dane_cert_usage_name(usage));
- printf("Certificate type: %s\n", dane_cert_type_name(type));
- printf("Contents: %s\n", dane_match_type_name(match));
size = buffer_size;
ret = gnutls_hex_encode(&data, (void*)buffer, &size);
if (ret < 0)
error (EXIT_FAILURE, 0, "gnutls_hex_encode: %s", dane_strerror (ret));
- printf("Data: %s\n\n", buffer);
-
fprintf(outfile, "_%u._%s.%s. IN TLSA ( %.2x %.2x %.2x %s )\n", port, proto, host, usage, type, match, buffer);
+
+ printf("\nCertificate usage: %s\n", dane_cert_usage_name(usage));
+ printf("Certificate type: %s\n", dane_cert_type_name(type));
+ printf("Contents: %s\n", dane_match_type_name(match));
+ printf("Data: %s\n", buffer);
+
}
/* Verify the DANE data */
@@ -257,7 +258,7 @@ size_t size;
if (ret < 0)
error (EXIT_FAILURE, 0, "dane_verification_status_print: %s", dane_strerror (ret));
- printf("\n%s\n", out.data);
+ printf("\nVerification: %s\n", out.data);
gnutls_free(out.data);
for (i=0;i<clist_size;i++)