Julien Loir
2ba8976f63
secur32: Ignore attribute when searching for buffer type.
...
Buffer types in PSecBufferDesc can have an optional attribute. When
searching, it must be ignored to ensure the buffer type is found.
Signed-off-by: Julien Loir <mini.jul.jl@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Alistair Leslie-Hughes
8ed81720e8
secur32: Set error flag on pull callback.
...
Fixes a regression introduced in b8aaf86b2d
Partial revert the pull_timeout function, which now return -1 and sets the
transport error to try again.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51440
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 12:13:13 +02:00
Hans Leidekker
b8aaf86b2d
secur32: Use blocking mode for DTLS sessions.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 19:55:22 +02:00
Gijs Vermeulen
4940d2ada2
secur32: Default to building with GnuTLS support on macOS, if present.
...
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-18 16:48:48 +02:00
Hans Leidekker
cae161389b
secur32: Translate errors from push/pull callbacks.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51192
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Hans Leidekker
fbd30fff03
secur32: Use CRT memory allocators.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Hans Leidekker
49dbde22bd
secur32: Use wide character string literals.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Hans Leidekker
04c6862d3f
secur32: Build with msvcrt.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Hans Leidekker
7d0889b747
secur32: Move Schannel support to a Unix library.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Hans Leidekker
a84b02992b
secur32: Use a pthread mutex in the macOS backend.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Hans Leidekker
4a45679f1a
secur32: Use a reserved flag for the cached credentials hack.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Hans Leidekker
1565a12a55
secur32: Get rid of builtin NTLM support.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Hans Leidekker
8a9c3b1e54
secur32: Load the MSV1_0 provider instead of using builtin support for NTLM.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Hans Leidekker
121910171c
secur32/tests: Add a Kerberos ticket cache test.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 10:49:42 +02:00
Hans Leidekker
ed06d64bf4
secur32: Return more attributes from schan_InitializeSecurityContextW.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 19:01:38 +01:00
Hans Leidekker
a114ce67db
secur32: Add support for setting DTLS MTU.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 19:01:38 +01:00
Hans Leidekker
f93284dfa4
secur32: Add DTLS support.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 19:01:38 +01:00
Hans Leidekker
37b29862b3
secur32: Add a helper to read TLS record size.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 19:01:38 +01:00
Hans Leidekker
3d1a98f486
secur32/tests: Add tests for renegotiating an SSL connection.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Rémi Bernon
86ab322377
secur32: Return STREAM_HEADER/TRAILER buffers on SEC_I_RENEGOTIATE.
...
And don't print an error anymore.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Damjan Jovanovic
de9238962c
secur32: Implement the SECPKG_ATTR_UNIQUE_BINDINGS context attribute.
...
.NET's System.Data.SqlClient needs this to connect to MSSQL Server.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-28 20:39:24 +01:00
Paul Gofman
c654839178
secur32: Prevent gnutls from using system priority file.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 20:22:33 +01:00
Alexandre Julliard
16254af818
secur32/tests: Update for new WineHQ certificate.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 19:30:42 +02:00
Hans Leidekker
341fe50c28
secur32: Add application protocol stubs for macOS.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 11:48:56 +02:00
Alistair Leslie-Hughes
353c16f0d6
secur32: Fix compile for older gnutls libraries.
...
GNUTLS_ALPN_SERVER_PRECEDENCE was introduced into 3.5.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-10 12:41:52 +02:00
Hans Leidekker
0527cf89fb
secur32: Add TLS application protocol negotiation support.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 21:04:04 +02:00
Hans Leidekker
af5f9e6d0f
secur32: Map GNUTLS_E_REHANDSHAKE to SEC_I_RENEGOTIATE.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 20:55:49 +02:00
Alexandre Julliard
55434d4539
secur32: Use standard dlopen() instead of the libwine wrappers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:19 +02:00
Michael Cronenworth
93888fbb3e
secur32: Global variable compatibility update for gcc 10.
...
Signed-off-by: Michael Cronenworth <mike@cchtml.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 18:16:04 +01:00
Gijs Vermeulen
fa38f34b0f
secur32: Avoid compiler warning.
...
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Hans Leidekker
1de8e293d8
secur32/tests: Fix test failures.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-04 22:11:20 +02:00
Zebediah Figura
d56f684707
secur32: Use RtlComputeCrc32().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 10:52:03 +02:00
Alexandre Julliard
3d6febc997
include: Get rid of the DPRINTF() macro.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:34:44 +02:00
Detlef Riekenberg
bd678b0b20
secur32: Handle a new, undefined SECPKG_FLAG value.
...
Recent Windows versions (current 8.1 and win 10 v1709 or older)
started using a new SECPKG_FLAG with the value 0x02000000,
but there is no definition in any SDK or online documentation.
Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 21:13:43 +01:00
Alistair Leslie-Hughes
fb78d19881
secur32: Stop memory leak (Coverity).
...
CID 1442946
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 14:50:16 +01:00
Hans Leidekker
ba14773187
secur32: Fix the username fallback in get_key_container_path.
...
Spotted by Sven Baars.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 18:21:57 +01:00
Michael Stefaniuc
8b343fd55b
secur32: Use offsetof() instead of pointer substraction.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-19 20:51:38 +01:00
Alistair Leslie-Hughes
9bbe5c3613
secur32: Fix compile error on older gnutls.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:18:16 +01:00
Hans Leidekker
5a0de62cf9
secur32: Fix default return flags for schannel contexts.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 12:11:45 +01:00
Hans Leidekker
e31bc3dbdb
secur32: Return ISC_RET_USED_SUPPLIED_CREDS for schannel contexts if the feature was requested.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46127
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 12:11:41 +01:00
Hans Leidekker
16d9f62bdf
secur32: Add support for client certificate authentication.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-07 12:54:35 +01:00
Hans Leidekker
4782b283d8
secur32: Ignore spurious callbacks on macOS.
...
For unknown reasons Mojave will sometimes call the schan_push_adapter callback during an SSLRead call.
This confuses our code which is only prepared to handle schan_pull_adapter callbacks in this context.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-04 15:40:53 +01:00
Jacek Caban
179ee89e65
secur32: Use VERS-ALL priority string only on recent gnutls versions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-07 16:43:37 +01:00
Jacek Caban
9dd0f8f4b7
secur32: Check for supported protocols when loading gnutls.
...
We mostly need to know if TLS1.3 is supported before attempting to
handle it. It's just in gnutls backend now, so it will not be actually
enabled yet.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-07 16:43:35 +01:00
Jacek Caban
5cc5b102c1
secur32: Use -VERS-ALL gnutls priority string to disable not enabled protocols.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46161
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-06 19:23:55 +01:00
Alex Henrie
639243192e
secur32: Turn variables 'bs' and 'ds' into static constants.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-30 19:36:51 +01:00
Jacek Caban
40c847d807
schannel.h: Add TLS 1.3 defines.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 19:46:33 +01:00
Hans Leidekker
061b0c459b
secur32/tests: Connect to test.winehq.org instead of www.winehq.org.
...
Also make the tests more strict.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-03 15:53:03 +02:00
Michael Stefaniuc
baf4cb3958
secur32: Use the ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-19 08:07:10 +02:00
Michael Stefaniuc
323198df10
secure32/tests: Use the available ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-31 09:25:19 +02:00