diff options
-rw-r--r-- | lib/openpgp/output.c | 6 | ||||
-rw-r--r-- | lib/x509/output.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/openpgp/output.c b/lib/openpgp/output.c index 0995b8071d..d9127c6150 100644 --- a/lib/openpgp/output.c +++ b/lib/openpgp/output.c @@ -564,6 +564,7 @@ gnutls_openpgp_crt_print(gnutls_openpgp_crt_t cert, gnutls_datum_t * out) { gnutls_buffer_st str; + int ret; _gnutls_buffer_init(&str); @@ -572,7 +573,10 @@ gnutls_openpgp_crt_print(gnutls_openpgp_crt_t cert, } else if (format == GNUTLS_CRT_PRINT_COMPACT) { print_oneline(&str, cert); - _gnutls_buffer_append_data(&str, "\n", 1); + ret = _gnutls_buffer_append_data(&str, "\n", 1); + if (ret < 0) + return gnutls_assert_val(ret); + print_key_fingerprint(&str, cert); } else { _gnutls_buffer_append_str(&str, diff --git a/lib/x509/output.c b/lib/x509/output.c index 8f8521285b..ff0f77c586 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -1898,13 +1898,17 @@ gnutls_x509_crt_print(gnutls_x509_crt_t cert, gnutls_datum_t * out) { gnutls_buffer_st str; + int ret; if (format == GNUTLS_CRT_PRINT_COMPACT) { _gnutls_buffer_init(&str); print_oneline(&str, cert); - _gnutls_buffer_append_data(&str, "\n", 1); + ret = _gnutls_buffer_append_data(&str, "\n", 1); + if (ret < 0) + return gnutls_assert_val(ret); + print_keyid(&str, cert); return _gnutls_buffer_to_datum(&str, out, 1); |