mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-30 16:32:18 +01:00
SRTP fixes:
* in wolfssl/ssl.h, add missing arg names to wolfSSL_CTX_set_tlsext_use_srtp(), wolfSSL_set_tlsext_use_srtp(), and wolfSSL_export_dtls_srtp_keying_material(); * in wolfcrypt/src/kdf.c, call wc_AesFree if and only if wc_AesInit() succeeded; * in src/ssl.c:DtlsSrtpSelProfiles(), fix bugprone-inc-dec-in-conditions; * in tests/suites.c:execute_test_case(), fix several -Wdeclaration-after-statement and -Wmissing-field-initializers; * in wolfcrypt/test/test.c, fix a shiftTooManyBitsSigned warning in srtpkdf_test(), and fix a typo (kaSz/ksSz).
This commit is contained in:
10
src/ssl.c
10
src/ssl.c
@@ -2240,15 +2240,19 @@ static int DtlsSrtpSelProfiles(word16* id, const char* profile_str)
|
||||
do {
|
||||
current = next;
|
||||
next = XSTRSTR(current, ":");
|
||||
current_length = (!next) ? (word32)XSTRLEN(current)
|
||||
: (word32)(next - current);
|
||||
if (next) {
|
||||
current_length = (word32)(next - current);
|
||||
++next; /* ++ needed to skip ':' */
|
||||
} else {
|
||||
current_length = (word32)XSTRLEN(current);
|
||||
}
|
||||
if (current_length < length)
|
||||
length = current_length;
|
||||
profile = DtlsSrtpFindProfile(current, current_length, 0);
|
||||
if (profile != NULL) {
|
||||
*id |= (1 << profile->id); /* selected bit based on ID */
|
||||
}
|
||||
} while (next != NULL && next++); /* ++ needed to skip ':' */
|
||||
} while (next != NULL);
|
||||
return WOLFSSL_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user