Commit Graph

518 Commits

Author SHA1 Message Date
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
Michael Müller 4ece6abdb5 secur32: Set output buffer size to zero during handshake when no data needs to be sent.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-15 12:36:56 +02:00
Francois Gouget ec55cd694a secur32: Make alloc_lsa_connection() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-30 20:41:59 +02:00
Hans Leidekker 61171a5f11 secur32: Return a handle from LsaRegisterLogonProcess.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-18 16:14:03 +02:00
Hans Leidekker d5a83ce67c secur32: Implement LsaDeregisterLogonProcess.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-18 16:14:00 +02:00
Dmitry Timoshkov d7430abd40 secur32: GetComputerObjectName should not set domain part of the name if it is NULL.
LsaQueryInformationPolicy(PolicyDnsDomainInformation) sets both Name and
DnsDomainName to NULL when hostname is set to a very long name like
"this_is_host.part21.part32.local" and supposedly can't be resolved due
to this.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-27 16:58:26 +02:00
Michael Stefaniuc d3e26f74ff secur32: Remove comment referencing an old macro.
Leftover from d117938f7a.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-06 15:46:10 -06:00
Dmitry Timoshkov 0197f54a8e secur32: Add support for NameFullyQualifiedDN to GetComputerObjectName.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-02 16:19:43 +01:00
Dmitry Timoshkov 652090f598 secur32: Fix GetComputerObjectNameW for the cases of NULL or insufficient buffer size.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-01 19:25:56 +01:00
Dmitry Timoshkov 8be0a5575f secur32/tests: Make GetComputerObjectName() tests pass when computer is part of a domain.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-28 19:39:49 +01:00
Francois Gouget 402c0de2a8 secur32: Make the SecurityFunctionTable[AW] functions static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-22 21:46:27 +01:00
Hans Leidekker f0db56775e secur32: Use the global memory allocation helpers.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 20:37:54 +01:00
Hans Leidekker 63b9fb3542 secur32: Forward to either Kerberos or NTLM from the Negotiate provider.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 20:37:54 +01:00
Hans Leidekker 3e4fb94d82 secur32: Implement QueryContextAttributesA(SECPKG_ATTR_NEGOTIATION_INFO) in the LSA wrapper.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 13:10:11 +01:00
Hans Leidekker 54dea1dc6a secur32: Implement SECPKG_ATTR_NEGOTIATION_INFO for NTLM.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 13:09:51 +01:00
Dmitry Timoshkov d2c22ab58e secur32: Print contents of LSA_STRING in traces.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-02 14:42:38 +01:00
Dmitry Timoshkov 9be9415576 secur32: Implement LsaFreeReturnBuffer.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:59 +01:00
Dmitry Timoshkov a87b55d92e secur32: Remove Kerberos SSPI stubs.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:57 +01:00
Dmitry Timoshkov 6932541ea6 secur32: Implement DecryptMessage in the SSP/AP wrapper.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:57 +01:00
Dmitry Timoshkov 67f0b15248 secur32: Implement EncryptMessage in the SSP/AP wrapper.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:57 +01:00
Dmitry Timoshkov a13576eb42 secur32: Implement VerifySignature in the SSP/AP wrapper.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:57 +01:00
Dmitry Timoshkov 5df33ec591 secur32: Implement MakeSignature in the SSP/AP wrapper.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:56 +01:00