secur32: Use blocking mode for DTLS sessions.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2021-06-29 13:56:41 +02:00 committed by Alexandre Julliard
parent c359b4a0e9
commit b8aaf86b2d
2 changed files with 2 additions and 11 deletions

View File

@ -879,11 +879,6 @@ static inline SIZE_T read_record_size(const BYTE *buf, SIZE_T header_size)
return (buf[header_size - 2] << 8) | buf[header_size - 1];
}
static inline BOOL is_dtls_context(const struct schan_context *ctx)
{
return (ctx->header_size == HEADER_SIZE_DTLS);
}
/***********************************************************************
* InitializeSecurityContextW
*/
@ -1011,7 +1006,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
return SEC_E_INCOMPLETE_MESSAGE;
}
}
else if (!is_dtls_context(ctx)) return SEC_E_INCOMPLETE_MESSAGE;
else return SEC_E_INCOMPLETE_MESSAGE;
TRACE("Using expected_size %lu.\n", expected_size);
}

View File

@ -292,10 +292,6 @@ static DWORD CDECL schan_get_enabled_protocols(void)
static int pull_timeout(gnutls_transport_ptr_t transport, unsigned int timeout)
{
struct schan_transport *t = (struct schan_transport *)transport;
SIZE_T count = 0;
if (callbacks->get_buffer(t, &t->in, &count)) return 1;
return 0;
}
@ -309,7 +305,7 @@ static BOOL CDECL schan_create_session(schan_session *session, schan_credentials
if (cred->enabled_protocols & (SP_PROT_DTLS1_0_CLIENT | SP_PROT_DTLS1_2_CLIENT))
{
flags |= GNUTLS_DATAGRAM | GNUTLS_NONBLOCK;
flags |= GNUTLS_DATAGRAM;
}
err = pgnutls_init(s, flags);