diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-04-07 09:26:01 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-04-07 10:55:17 +0200 |
commit | 295328b25b1b7114779cb7c919bf9ab669f1ba34 (patch) | |
tree | ccce0a3f2fee0c54cec87de29bed439cfeb98c56 /lib | |
parent | 512921d97c0b23ab6ef041ba6dc9b9d3e8d89a9e (diff) | |
download | gnutls-295328b25b1b7114779cb7c919bf9ab669f1ba34.tar.gz |
x509/output: do not print usage entry when there is none
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/x509/output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/x509/output.c b/lib/x509/output.c index e071c14031..8ebb998ed2 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -2569,8 +2569,10 @@ print_pubkey_other(gnutls_buffer_st * str, gnutls_pubkey_t pubkey, } adds(str, "\n"); - adds(str, _("Public Key Usage:\n")); - print_key_usage2(str, "\t", pubkey->key_usage); + if (pubkey->key_usage) { + adds(str, _("Public Key Usage:\n")); + print_key_usage2(str, "\t", pubkey->key_usage); + } print_obj_id(str, "", pubkey, (get_id_func*)gnutls_pubkey_get_key_id); } |