diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-05-08 06:27:21 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-05-08 06:27:21 +0200 |
commit | 6b4d582a8f2cc8af5df05b31ef6f7612399f654c (patch) | |
tree | 31ba5584ef9ba2f106dd6db1b131dd078c79bed3 /lib/errors.h | |
parent | 66a8553447fc700b0fb4e8d34e868655063d156c (diff) | |
download | gnutls-6b4d582a8f2cc8af5df05b31ef6f7612399f654c.tar.gz |
errors.h: _gnutls_cert_log will only print on non-null certificates
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib/errors.h')
-rw-r--r-- | lib/errors.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/errors.h b/lib/errors.h index 7412a291f5..6ffc4172eb 100644 --- a/lib/errors.h +++ b/lib/errors.h @@ -61,7 +61,7 @@ void _gnutls_mpi_log(const char *prefix, bigint_t a); #define _gnutls_cert_log(str, cert) \ do { \ - if (unlikely(_gnutls_log_level >= 3)) { \ + if (unlikely(_gnutls_log_level >= 3 && cert != NULL)) { \ gnutls_datum_t _cl_out; int _cl_ret; \ _cl_ret = gnutls_x509_crt_print(cert, GNUTLS_CRT_PRINT_ONELINE, &_cl_out); \ if (_cl_ret >= 0) { \ |