mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
always tls13 suites in the front position
This commit is contained in:
22
src/ssl.c
22
src/ssl.c
@ -12005,6 +12005,15 @@ static char* buildEnabledCipherList(WOLFSSL_CTX* ctx, Suites* suites,
|
|||||||
|
|
||||||
head = locallist;
|
head = locallist;
|
||||||
|
|
||||||
|
if (!onlytlsv13suites)
|
||||||
|
{
|
||||||
|
/* always tls13 suites in the head position */
|
||||||
|
XSTRNCPY(locallist, list, len);
|
||||||
|
locallist += listsz;
|
||||||
|
*locallist = 0;
|
||||||
|
len -= listsz;
|
||||||
|
}
|
||||||
|
|
||||||
for(idx = 0; idx < suites->suiteSz; idx++) {
|
for(idx = 0; idx < suites->suiteSz; idx++) {
|
||||||
cipherSuite0 = suites->suites[idx];
|
cipherSuite0 = suites->suites[idx];
|
||||||
cipherSuite = suites->suites[++idx];
|
cipherSuite = suites->suites[++idx];
|
||||||
@ -12030,9 +12039,12 @@ static char* buildEnabledCipherList(WOLFSSL_CTX* ctx, Suites* suites,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
XSTRNCPY(locallist, list, len);
|
|
||||||
locallist += listsz;
|
if (onlytlsv13suites) {
|
||||||
*locallist = 0;
|
XSTRNCPY(locallist, list, len);
|
||||||
|
locallist += listsz;
|
||||||
|
*locallist = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return head;
|
return head;
|
||||||
} else
|
} else
|
||||||
@ -12079,8 +12091,8 @@ static int CheckcipherList(const char* list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
|
Reference in New Issue
Block a user