mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
Fix for TLS v1.3 test PSK callback to support cipher list. Add support for GetCipherSuiteFromName
to accept a name ending with colon.
This commit is contained in:
@@ -2080,7 +2080,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
|
|
||||||
#ifndef NO_PSK
|
#ifndef NO_PSK
|
||||||
if (usePsk) {
|
if (usePsk) {
|
||||||
done += 1; /* don't perform exernal tests if PSK is enabled */
|
done += 1; /* don't perform external tests if PSK is enabled */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -18723,7 +18723,15 @@ int GetCipherSuiteFromName(const char* name, byte* cipherSuite0,
|
|||||||
{
|
{
|
||||||
int ret = BAD_FUNC_ARG;
|
int ret = BAD_FUNC_ARG;
|
||||||
int i;
|
int i;
|
||||||
unsigned long len = (unsigned long)XSTRLEN(name);
|
unsigned long len;
|
||||||
|
const char* nameDelim;
|
||||||
|
|
||||||
|
/* Support trailing : */
|
||||||
|
nameDelim = XSTRSTR(name, ":");
|
||||||
|
if (nameDelim)
|
||||||
|
len = (unsigned long)(nameDelim - name);
|
||||||
|
else
|
||||||
|
len = (unsigned long)XSTRLEN(name);
|
||||||
|
|
||||||
for (i = 0; i < GetCipherNamesSize(); i++) {
|
for (i = 0; i < GetCipherNamesSize(); i++) {
|
||||||
if (XSTRNCMP(name, cipher_names[i].name, len) == 0) {
|
if (XSTRNCMP(name, cipher_names[i].name, len) == 0) {
|
||||||
|
Reference in New Issue
Block a user