diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-04-09 13:31:54 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-04-09 13:42:58 +0200 |
commit | 39501ef6ee826b36a570bd233e3d5b0017dbd2a3 (patch) | |
tree | fa34ee044bcf84c643f0421e10d93d857152ab66 | |
parent | 6bca68a43db9856451e860aa814a3dd3a0148885 (diff) | |
download | gnutls-39501ef6ee826b36a570bd233e3d5b0017dbd2a3.tar.gz |
x509 output: don't warn about insecure algorithm when unknown
-rw-r--r-- | lib/x509/ocsp_output.c | 2 | ||||
-rw-r--r-- | lib/x509/output.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/x509/ocsp_output.c b/lib/x509/ocsp_output.c index 895079c7b6..ed55543613 100644 --- a/lib/x509/ocsp_output.c +++ b/lib/x509/ocsp_output.c @@ -530,7 +530,7 @@ print_resp(gnutls_buffer_st * str, gnutls_ocsp_resp_t resp, name = _("unknown"); addf(str, _("\tSignature Algorithm: %s\n"), name); } - if (gnutls_sign_is_secure(ret) == 0) { + if (ret != GNUTLS_SIGN_UNKNOWN && gnutls_sign_is_secure(ret) == 0) { adds(str, _("warning: signed using a broken signature " "algorithm that can be forged.\n")); diff --git a/lib/x509/output.c b/lib/x509/output.c index 05c7be339e..0caf79b7dc 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -1446,7 +1446,7 @@ print_cert(gnutls_buffer_st * str, gnutls_x509_crt_t cert, name = _("unknown"); addf(str, _("\tSignature Algorithm: %s\n"), name); } - if (gnutls_sign_is_secure(err) == 0) { + if (err != GNUTLS_SIGN_UNKNOWN && gnutls_sign_is_secure(err) == 0) { adds(str, _("warning: signed using a broken signature " "algorithm that can be forged.\n")); @@ -2088,7 +2088,7 @@ print_crl(gnutls_buffer_st * str, gnutls_x509_crl_t crl, int notsigned) name = _("unknown"); addf(str, _("\tSignature Algorithm: %s\n"), name); } - if (gnutls_sign_is_secure(err) == 0) { + if (err != GNUTLS_SIGN_UNKNOWN && gnutls_sign_is_secure(err) == 0) { adds(str, _("warning: signed using a broken signature " "algorithm that can be forged.\n")); |