diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-02-22 11:11:06 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-02-23 10:31:39 +0100 |
commit | 1b1781cfad22cc2515977b8dee7f19ea0a3b3087 (patch) | |
tree | 54479987721c3ff66fa740895214c50e4b06ca1f | |
parent | 0bd927fcf5c5f17a9c267efbb5c01e90d6162714 (diff) | |
download | gnutls-1b1781cfad22cc2515977b8dee7f19ea0a3b3087.tar.gz |
x509/output: print key PIN on oneline output
That is, instead of the public key ID. The key PIN due to HPKP
is now more widely used than hex-based key IDs.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | lib/x509/output.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/x509/output.c b/lib/x509/output.c index fb9f08ed80..e75472ea07 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -1843,12 +1843,12 @@ static void print_oneline(gnutls_buffer_st * str, gnutls_x509_crt_t cert) err = gnutls_x509_crt_get_key_id(cert, GNUTLS_KEYID_USE_SHA256, buffer, &size); if (err < 0) { - addf(str, "key ID error (%s)", + addf(str, "key PIN error (%s)", gnutls_strerror(err)); } else { - addf(str, "key-ID `sha256:"); - _gnutls_buffer_hexprint(str, buffer, size); - adds(str, "'"); + addf(str, "pin-sha256=\""); + _gnutls_buffer_base64print(str, buffer, size); + adds(str, "\""); } } |