mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 04:34: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
|
||||
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
|
||||
|
||||
|
@@ -18723,7 +18723,15 @@ int GetCipherSuiteFromName(const char* name, byte* cipherSuite0,
|
||||
{
|
||||
int ret = BAD_FUNC_ARG;
|
||||
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++) {
|
||||
if (XSTRNCMP(name, cipher_names[i].name, len) == 0) {
|
||||
|
Reference in New Issue
Block a user