Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -10836,8 +10836,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
ssl->options.dtls = 1;
ssl->options.tls = 1;
ssl->options.tls1_1 = 1;
if (!IsDtlsNotSctpMode(ssl) || !IsDtlsNotSrtpMode(ssl) ||
IsSCR(ssl))
if (!IsDtlsNotSctpMode(ssl) || IsSCR(ssl))
ssl->options.dtlsStateful = 1;
}
#endif
Expand Down
1 change: 1 addition & 0 deletions tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -51226,6 +51226,7 @@ TEST_DECL(test_wc_RsaPSS_DigitalSignVerify),
TEST_DECL(test_dtls_rtx_across_epoch_change),
TEST_DECL(test_dtls_drop_client_ack),
TEST_DECL(test_dtls_replay),
TEST_DECL(test_dtls_srtp),
TEST_DECL(test_dtls13_ack_order),
TEST_DECL(test_dtls_version_checking),
TEST_DECL(test_ocsp_status_callback),
Expand Down
38 changes: 38 additions & 0 deletions tests/api/test_dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1525,3 +1525,41 @@ int test_dtls_replay(void)
#endif
return EXPECT_RESULT();
}

#if defined(WOLFSSL_DTLS13) && defined(HAVE_SSL_MEMIO_TESTS_DEPENDENCIES) && \
defined(WOLFSSL_SRTP)
static int test_dtls_srtp_ctx_ready(WOLFSSL_CTX* ctx)
{
EXPECT_DECLS;
ExpectIntEQ(wolfSSL_CTX_set_tlsext_use_srtp(ctx, "SRTP_AEAD_AES_256_GCM:"
"SRTP_AEAD_AES_128_GCM:SRTP_AES128_CM_SHA1_80:SRTP_AES128_CM_SHA1_32"),
0);
return EXPECT_RESULT();
}

int test_dtls_srtp(void)
{
EXPECT_DECLS;
test_ssl_cbf client_cbf;
test_ssl_cbf server_cbf;

XMEMSET(&client_cbf, 0, sizeof(client_cbf));
XMEMSET(&server_cbf, 0, sizeof(server_cbf));

client_cbf.method = wolfDTLSv1_3_client_method;
client_cbf.ctx_ready = test_dtls_srtp_ctx_ready;
server_cbf.method = wolfDTLSv1_3_server_method;
server_cbf.ctx_ready = test_dtls_srtp_ctx_ready;

ExpectIntEQ(test_wolfSSL_client_server_nofail_memio(&client_cbf,
&server_cbf, NULL), TEST_SUCCESS);

return EXPECT_RESULT();
}
#else
int test_dtls_srtp(void)
{
EXPECT_DECLS;
return EXPECT_RESULT();
}
#endif
1 change: 1 addition & 0 deletions tests/api/test_dtls.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ int test_dtls_record_cross_boundaries(void);
int test_dtls_rtx_across_epoch_change(void);
int test_dtls_drop_client_ack(void);
int test_dtls_replay(void);
int test_dtls_srtp(void);
#endif /* TESTS_API_DTLS_H */
Loading