From: Simon Ruderich Date: Thu, 8 Aug 2013 19:22:59 +0000 (+0200) Subject: verify.c: Reorder validation checks. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=2e96ede8aa7a32d840fa62fd8c4520960b69348d;p=tlsproxy%2Ftlsproxy.git verify.c: Reorder validation checks. --- 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; }