summaryrefslogtreecommitdiff
path: root/lib/x509/verify.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/x509/verify.c')
-rw-r--r--lib/x509/verify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/x509/verify.c b/lib/x509/verify.c
index 84746d4e85..2a89883513 100644
--- a/lib/x509/verify.c
+++ b/lib/x509/verify.c
@@ -350,12 +350,16 @@ static unsigned int check_time_status(gnutls_x509_crt_t crt, time_t now)
static
int is_broken_allowed(gnutls_sign_algorithm_t sig, unsigned int flags)
{
+ /* the first two are for backwards compatibility */
if ((sig == GNUTLS_SIGN_RSA_MD2)
&& (flags & GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD2))
return 1;
if ((sig == GNUTLS_SIGN_RSA_MD5)
&& (flags & GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5))
return 1;
+ /* we no longer have individual flags - but rather a catch all */
+ if ((flags & GNUTLS_VERIFY_ALLOW_BROKEN) == GNUTLS_VERIFY_ALLOW_BROKEN)
+ return 1;
return 0;
}