Skip to content

Commit

Permalink
wolfSSL_CTX_set_tlsext_use_srtp() should return 1 on failure and 0 up…
Browse files Browse the repository at this point in the history
…on success.

Same with wolfSSL_set_tlsext_use_srtp().

See https://docs.openssl.org/1.1.1/man3/SSL_CTX_set_tlsext_use_srtp/
  • Loading branch information
anhu committed Dec 4, 2024
1 parent 35e5074 commit 5183908
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,13 @@ int wolfSSL_CTX_set_tlsext_use_srtp(WOLFSSL_CTX* ctx, const char* profile_str)
if (ctx != NULL) {
ret = DtlsSrtpSelProfiles(&ctx->dtlsSrtpProfiles, profile_str);
}

if (ret == WOLFSSL_FAILURE) {
ret = 1;
} else {
ret = 0;
}

return ret;
}
int wolfSSL_set_tlsext_use_srtp(WOLFSSL* ssl, const char* profile_str)
Expand All @@ -2081,6 +2088,13 @@ int wolfSSL_set_tlsext_use_srtp(WOLFSSL* ssl, const char* profile_str)
if (ssl != NULL) {
ret = DtlsSrtpSelProfiles(&ssl->dtlsSrtpProfiles, profile_str);
}

if (ret == WOLFSSL_FAILURE) {
ret = 1;
} else {
ret = 0;
}

return ret;
}

Expand Down

0 comments on commit 5183908

Please sign in to comment.