From 2e96ede8aa7a32d840fa62fd8c4520960b69348d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 8 Aug 2013 21:22:59 +0200 Subject: [PATCH] verify.c: Reorder validation checks. --- src/verify.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/verify.c b/src/verify.c index ab44992..b6f1ff8 100644 --- a/src/verify.c +++ b/src/verify.c @@ -55,10 +55,11 @@ int verify_tls_connection(gnutls_session_t session, const char *hostname) { return -1; } /* Definitely an invalid certificate, abort. */ - if (status & GNUTLS_CERT_EXPIRED - || status & GNUTLS_CERT_REVOKED + if (status & GNUTLS_CERT_REVOKED + || status & GNUTLS_CERT_INSECURE_ALGORITHM || status & GNUTLS_CERT_NOT_ACTIVATED - || status & GNUTLS_CERT_INSECURE_ALGORITHM) { + || status & GNUTLS_CERT_EXPIRED + ) { LOG(WARNING, "verify_tls_connection(): invalid server certificate"); return -1; } -- 2.45.2