Fix ciphersuite version check.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 19 Jan 2017 07:58:45 +0000 (16:58 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 19 Jan 2017 07:58:45 +0000 (16:58 +0900)
* src/ciphersuites.c (_ntbtls_ciphersuite_version_ok): Fix.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
src/ciphersuites.c

index 5840a43..a93c347 100644 (file)
@@ -1409,8 +1409,8 @@ _ntbtls_ciphersuite_version_ok (ciphersuite_t suite,
   if (!suite)
     return 0;
 
-  return (suite->min_minor_ver >= min_minor_ver
-          && suite->max_minor_ver <= max_minor_ver);
+  return (suite->min_minor_ver <= max_minor_ver
+          && suite->max_minor_ver >= min_minor_ver);
 }