forked from wolfSSL/wolfssl
addressed code review part2
This commit is contained in:
16
src/ssl.c
16
src/ssl.c
@ -12097,17 +12097,21 @@ static int CheckcipherList(const char* list)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (findTLSv13Suites == 1 && findbeforeSuites == 1)
|
if (findTLSv13Suites == 1 && findbeforeSuites == 1) {
|
||||||
/* list has mixed suites */
|
/* list has mixed suites */
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
} while (next++); /* ++ needed to skip ':' */
|
} while (next++); /* ++ needed to skip ':' */
|
||||||
|
|
||||||
if (findTLSv13Suites == 0 && findbeforeSuites == 1)
|
if (findTLSv13Suites == 0 && findbeforeSuites == 1) {
|
||||||
return 1;/* only before TLSv13 sutes */
|
return 1;/* only before TLSv13 sutes */
|
||||||
else if (findTLSv13Suites == 1 && findbeforeSuites == 0)
|
}
|
||||||
|
else if (findTLSv13Suites == 1 && findbeforeSuites == 0) {
|
||||||
return 2;/* only TLSv13 suties */
|
return 2;/* only TLSv13 suties */
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
return 0;/* handle as mixed */
|
return 0;/* handle as mixed */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parse some bulk lists like !eNULL / !aNULL
|
/* parse some bulk lists like !eNULL / !aNULL
|
||||||
@ -12202,12 +12206,12 @@ static int wolfSSL_parse_cipher_list(WOLFSSL_CTX* ctx, Suites* suites,
|
|||||||
tls13Only, list);
|
tls13Only, list);
|
||||||
|
|
||||||
if (buildcipherList) {
|
if (buildcipherList) {
|
||||||
|
|
||||||
ret = SetCipherList(ctx, suites, buildcipherList);
|
ret = SetCipherList(ctx, suites, buildcipherList);
|
||||||
XFREE(buildcipherList, ctx->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
XFREE(buildcipherList, ctx->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
ret = SetCipherList(ctx, suites, list);
|
ret = SetCipherList(ctx, suites, list);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user