Further de-obfuscation
authorBenjamin Kaduk <bkaduk@akamai.com>
Tue, 21 Mar 2017 21:30:21 +0000 (16:30 -0500)
committerRichard Levitte <levitte@openssl.org>
Wed, 29 Mar 2017 05:33:39 +0000 (07:33 +0200)
A similar change that probably should have been wrapped into
commit e0926ef49df09a85117d7442db83f321aeb5b982.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3010)

ssl/statem/statem_lib.c

index 19d4b46..0cde2e7 100644 (file)
@@ -1933,12 +1933,11 @@ int check_in_list(SSL *s, unsigned int group_id, const unsigned char *groups,
         if (group_id == share_id
                 && (!checkallow
                     || tls_curve_allowed(s, groups, SSL_SECOP_CURVE_CHECK))) {
-            break;
+            return 1;
         }
     }
 
-    /* If i == num_groups then not in the list */
-    return i < num_groups;
+    return 0;
 }
 #endif