From: Connor McAdams cmcadams@codeweavers.com
In order for DTLS retransmission to occur properly, we need to be in non-blocking mode.
Signed-off-by: Connor McAdams cmcadams@codeweavers.com Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/secur32/schannel_gnutls.c | 7 +++---- dlls/secur32/tests/schannel.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c index ac51cbb5d9f..3f947870a73 100644 --- a/dlls/secur32/schannel_gnutls.c +++ b/dlls/secur32/schannel_gnutls.c @@ -461,14 +461,13 @@ static NTSTATUS schan_get_enabled_protocols( void *args ) static int pull_timeout(gnutls_transport_ptr_t transport, unsigned int timeout) { struct schan_transport *t = (struct schan_transport*)transport; - gnutls_session_t s = (gnutls_session_t)t->session; SIZE_T count = 0;
TRACE("\n");
if (get_buffer(t, &t->in, &count)) return 1; - pgnutls_transport_set_errno(s, EAGAIN); - return -1; + + return 0; }
static NTSTATUS schan_create_session( void *args ) @@ -483,7 +482,7 @@ static NTSTATUS schan_create_session( void *args )
if (cred->enabled_protocols & (SP_PROT_DTLS1_0_CLIENT | SP_PROT_DTLS1_2_CLIENT)) { - flags |= GNUTLS_DATAGRAM; + flags |= GNUTLS_DATAGRAM | GNUTLS_NONBLOCK; }
err = pgnutls_init(s, flags); diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c index afcc382927a..902a490a296 100644 --- a/dlls/secur32/tests/schannel.c +++ b/dlls/secur32/tests/schannel.c @@ -1706,7 +1706,7 @@ static void test_dtls(void) ok( ctx_handle.dwUpper == ctx_handle2.dwUpper, "dwUpper mismatch, expected %#lx, got %#lx\n", ctx_handle.dwUpper, ctx_handle2.dwUpper);
/* With no new input buffer, output buffer length should match prior call. */ - todo_wine ok(buffers[1].pBuffers[0].cbBuffer == prev_buf_len, "Output buffer size mismatch, expected %#x, got %#x\n", + ok(buffers[1].pBuffers[0].cbBuffer == prev_buf_len, "Output buffer size mismatch, expected %#x, got %#x\n", prev_buf_len, buffers[1].pBuffers[0].cbBuffer);
free_buffers( &buffers[0] );
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=106160
Your paranoid android.
=== w1064 (32 bit report) ===
secur32: schannel.c:1442: Test failed: got 00090317 schannel.c:1452: Test failed: DecryptMessage failed: 80090317
=== w1064 (64 bit report) ===
secur32: schannel.c:1442: Test failed: got 00090317 schannel.c:1452: Test failed: DecryptMessage failed: 80090317