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:
parent
c359b4a0e9
commit
b8aaf86b2d
|
@ -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];
|
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
|
* InitializeSecurityContextW
|
||||||
*/
|
*/
|
||||||
|
@ -1011,7 +1006,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
|
||||||
return SEC_E_INCOMPLETE_MESSAGE;
|
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);
|
TRACE("Using expected_size %lu.\n", expected_size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,10 +292,6 @@ static DWORD CDECL schan_get_enabled_protocols(void)
|
||||||
|
|
||||||
static int pull_timeout(gnutls_transport_ptr_t transport, unsigned int timeout)
|
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;
|
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))
|
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);
|
err = pgnutls_init(s, flags);
|
||||||
|
|
Loading…
Reference in New Issue