]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/commitdiff
verify.c: Reorder validation checks.
authorSimon Ruderich <simon@ruderich.org>
Thu, 8 Aug 2013 19:22:59 +0000 (21:22 +0200)
committerSimon Ruderich <simon@ruderich.org>
Thu, 8 Aug 2013 19:22:59 +0000 (21:22 +0200)
src/verify.c

index ab4499213c3f137f65e17623ed514563fc272066..b6f1ff845aab14bb7a55c8d7106d8e09f63c1804 100644 (file)
@@ -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;
     }