mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
addressed code review part2
This commit is contained in:
16
src/ssl.c
16
src/ssl.c
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user