addressed code review part2

This commit is contained in:
Hideki Miyazaki
2021-06-17 16:26:51 +09:00
parent 368dd7b501
commit b52ff200de

View File

@ -12097,18 +12097,22 @@ static int CheckcipherList(const char* list)
break;
}
}
if (findTLSv13Suites == 1 && findbeforeSuites == 1)
if (findTLSv13Suites == 1 && findbeforeSuites == 1) {
/* list has mixed suites */
return 0;
}
} while (next++); /* ++ needed to skip ':' */
if (findTLSv13Suites == 0 && findbeforeSuites == 1)
if (findTLSv13Suites == 0 && findbeforeSuites == 1) {
return 1;/* only before TLSv13 sutes */
else if (findTLSv13Suites == 1 && findbeforeSuites == 0)
}
else if (findTLSv13Suites == 1 && findbeforeSuites == 0) {
return 2;/* only TLSv13 suties */
else
}
else {
return 0;/* handle as mixed */
}
}
/* parse some bulk lists like !eNULL / !aNULL
*
@ -12202,12 +12206,12 @@ static int wolfSSL_parse_cipher_list(WOLFSSL_CTX* ctx, Suites* suites,
tls13Only, list);
if (buildcipherList) {
ret = SetCipherList(ctx, suites, buildcipherList);
XFREE(buildcipherList, ctx->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
else
else {
ret = SetCipherList(ctx, suites, list);
}
return ret;
}