changeset 4622:8ab62e98ae78

recognize obsolete hash algorithms when complaining about...obsolete hash algorithms
author corvid
date Mo, 04 Jul 2016 01:51:02 +0000
parents 78aeb8eae728
children c449be1f747f
files src/IO/tls.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/IO/tls.c	Mo Jul 04 01:39:45 2016 +0000
+++ b/src/IO/tls.c	Mo Jul 04 01:51:02 2016 +0000
@@ -611,7 +611,10 @@
  */
 static void Tls_cert_bad_hash(const mbedtls_x509_crt *cert, Dstr *ds)
 {
-   const char *hash = (cert->sig_md == MBEDTLS_MD_SHA1) ? "SHA1" :
+   const char *hash = (cert->sig_md == MBEDTLS_MD_MD5) ? "MD5" :
+                      (cert->sig_md == MBEDTLS_MD_MD4) ? "MD4" :
+                      (cert->sig_md == MBEDTLS_MD_MD2) ? "MD2" :
+                      (cert->sig_md == MBEDTLS_MD_SHA1) ? "SHA1" :
                       (cert->sig_md == MBEDTLS_MD_SHA224) ? "SHA224" :
                       (cert->sig_md == MBEDTLS_MD_RIPEMD160) ? "RIPEMD160" :
                       (cert->sig_md == MBEDTLS_MD_SHA256) ? "SHA256" :