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:24:44 +0100 |
commit | bf0806e2ec2dff63a1ad8e394b1fe2f0ebc3b7a8 (patch) | |
tree | 0afc5a6d1ab7fb3827400f930999e8f3d80567ec | |
parent | ec60a3daa051603b0be5e1ba7a8484fb5fe7f42a (diff) | |
download | gnutls-bf0806e2ec2dff63a1ad8e394b1fe2f0ebc3b7a8.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 2eca0b99cf..99644cc168 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -1847,12 +1847,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, "\""); } } |