summaryrefslogtreecommitdiff
path: root/src/certtool-common.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-07 09:21:19 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-07 13:13:16 +0200
commitde9effc17530f43a4380bd4d248cbf8225bf01b6 (patch)
treec01c945917cd5dc0d68654702534e58b2859e267 /src/certtool-common.c
parentcc381d566593dc833a82038a1d620cc3f9e9b651 (diff)
downloadgnutls-de9effc17530f43a4380bd4d248cbf8225bf01b6.tar.gz
certtool: improved printing of the key PIN and key ID
That is, on private keys use the same format when printing the public Key ID and public key PIN, as when printing it in certificates. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'src/certtool-common.c')
-rw-r--r--src/certtool-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/certtool-common.c b/src/certtool-common.c
index c62d15eb27..30f6884da5 100644
--- a/src/certtool-common.c
+++ b/src/certtool-common.c
@@ -1194,14 +1194,14 @@ static void privkey_info_int(FILE *outfile, common_info_st * cinfo,
raw_to_base64(lbuffer, size));
fprintf(outfile, "Public Key ID:\n\tsha256:%s\n",
- raw_to_string(lbuffer, size));
+ raw_to_hex(lbuffer, size));
size = lbuffer_size;
ret =
gnutls_x509_privkey_get_key_id(key, GNUTLS_KEYID_USE_SHA1, lbuffer, &size);
if (ret >= 0) {
fprintf(outfile, "\tsha1:%s\n",
- raw_to_string(lbuffer, size));
+ raw_to_hex(lbuffer, size));
}
}
fprintf(outfile, "\n");