diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a2ae9cff4..a3d61ed6a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -81,6 +81,7 @@ jobs: -DCMAKE_C_FLAGS="-DWOLFSSL_DTLS_CH_FRAG" \ .. cmake --build . + ctest -j $(nproc) cmake --install . # Kyber Cmake broken diff --git a/examples/client/client.c b/examples/client/client.c index 3bd54a6c7..5c2e34053 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -3280,7 +3280,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) #ifdef WOLFSSL_SRTP if (dtlsSrtpProfiles != NULL) { if (wolfSSL_CTX_set_tlsext_use_srtp(ctx, dtlsSrtpProfiles) - != WOLFSSL_SUCCESS) { + != 0) { err_sys("unable to set DTLS SRTP profile"); } } diff --git a/examples/server/server.c b/examples/server/server.c index 5df44d19f..83581ee42 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -2680,7 +2680,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args) #ifdef WOLFSSL_SRTP if (dtlsSrtpProfiles != NULL) { if (wolfSSL_CTX_set_tlsext_use_srtp(ctx, dtlsSrtpProfiles) - != WOLFSSL_SUCCESS) { + != 0) { err_sys_ex(catastrophic, "unable to set DTLS SRTP profile"); } } diff --git a/src/ssl.c b/src/ssl.c index d684f19a9..9055142ec 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -2152,6 +2152,15 @@ static int DtlsSrtpSelProfiles(word16* id, const char* profile_str) return WOLFSSL_SUCCESS; } +/** + * @brief Set the SRTP protection profiles for DTLS. + * + * @param ctx Pointer to the WOLFSSL_CTX structure representing the SSL/TLS + * context. + * @param profile_str A colon-separated string of SRTP profile names. + * @return 0 on success to match OpenSSL + * @return 1 on error to match OpenSSL + */ int wolfSSL_CTX_set_tlsext_use_srtp(WOLFSSL_CTX* ctx, const char* profile_str) { int ret = WC_NO_ERR_TRACE(WOLFSSL_FAILURE); @@ -2167,6 +2176,16 @@ int wolfSSL_CTX_set_tlsext_use_srtp(WOLFSSL_CTX* ctx, const char* profile_str) return ret; } + +/** + * @brief Set the SRTP protection profiles for DTLS. + * + * @param ssl Pointer to the WOLFSSL structure representing the SSL/TLS + * session. + * @param profile_str A colon-separated string of SRTP profile names. + * @return 0 on success to match OpenSSL + * @return 1 on error to match OpenSSL + */ int wolfSSL_set_tlsext_use_srtp(WOLFSSL* ssl, const char* profile_str) { int ret = WC_NO_ERR_TRACE(WOLFSSL_FAILURE);