Alexandre Julliard
f0cd33c69e
include: Add support for defining Win32 types as 'long' where possible.
...
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Eric Pouech
f88507a4fd
crypt32: Use correct integral type.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 11:13:00 +01:00
Fabian Maurer
281836d5b1
crypt32/tests: Avoid "misleading indentation" warnings.
...
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:26 +01:00
Paul Gofman
861ae99683
crypt32: Increase maximum object encode length.
...
E. g., DigiCert CRL file is currently 35MB.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-13 17:05:14 +01:00
Alex Henrie
4fd80941f8
crypt32/tests: Make pfxdata static.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 22:57:01 +01:00
Alexandre Julliard
b714ed411a
crypt32/tests: Mark a failing test as todo.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-17 15:05:09 +01:00
Alexandre Julliard
b52c6bfbb1
crypt32: Implement Wow64 entry points in the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 17:54:01 +01:00
Dmitry Timoshkov
8afb89436f
crypt32: Avoid truncating unicode chars.
...
So that strings containing Cyrillic Capital Letter ER (0x420) won't be
quoted when not needed.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 20:57:54 +01:00
Alexandre Julliard
41663e6ea5
crypt32: Convert the Unix library to the __wine_unix_call interface.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-31 17:09:52 +01:00
Alexandre Julliard
f18ccfef7b
crypt32: Split the import_cert_store function to move memory allocations to the PE side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-31 17:09:52 +01:00
Alexandre Julliard
97479d3d32
ntdll: Move some exception definitions to winternl.h.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 13:52:42 +02:00
Charles Davis
6eab45621c
crypt32: Use the SecItemExport() function.
...
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 10:03:46 +02:00
Alexandre Julliard
088a787a2c
makefiles: Make -mno-cygwin the default.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Francois Gouget
dc502ec5d0
crypt32: Make gnutls_(un)?initialize() static.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 15:51:52 +02:00
Aaron Hill
0342de8e4d
crypt32: Add missing 'break' to X509_ECC_SIGNATURE case.
...
This was accidentally removed as part of commit
5edf65616a
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51501
Signed-off-by: Aaron Hill <aa1ronham@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:25 +02:00
Zebediah Figura
bdcddf024f
crypt32: Copy the CRL_INFO structure instead of recalculating it.
...
Steam calls CertGetCertificateChain() on a certificate with a 20 MB CRL, which
can take over 400 ms to parse each time. Avoid parsing it more often than we
need to.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 22:02:23 +02:00
Zebediah Figura
1c501c6587
crypt32: Rename "crl" and "cloned" to "dst" and "src" in CRL_clone().
...
"cloned" is very ambiguous and can be interpreted as the destination rather than
the source.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 22:02:20 +02:00
Aaron Hill
5edf65616a
crypt32: Implement CNG_RSA_PUBLIC_KEY_BLOB encoding/decoding.
...
Add support for the OID CNG_RSA_PUBLIC_KEY_BLOB to
CryptEncodeObjectEx and CryptDecodeObjectEx. This OID
decodes to / encodes from memory consisting of a
BCRYPT_RSAKEY_BLOB, followed in memory by the exponent and
modulus in big-endian format.
Signed-off-by: Aaron Hill <aa1ronham@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:17:41 +02:00
Rémi Bernon
8b8b43d5f3
crypt32: Grow item size buffer by more than 1 at a time.
...
When Steam starts and connects, it sometimes does some crypt32
processing and ends up spending a huge amount of time in ntdll memcpy,
reallocating buffers, effectively getting stuck while connecting to the
user account.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:49:09 +02:00
Piotr Caban
6ac02c0cac
crypt32: Handle CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG when verifying chain policy.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 18:03:47 +02:00
Piotr Caban
be3f6c87a0
crypt32/tests: Fix tests skipped on all test bot machines.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 18:03:42 +02:00
Piotr Caban
a0dc2adf73
crypt32/tests: Fix tests on systems where google chain root is not trusted.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 18:03:37 +02:00
Dmitry Timoshkov
3038c0cd1a
crypt32/tests: Remove Win9x checks.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 20:50:15 +02:00
Dmitry Timoshkov
67c8ffc847
crypt32/tests: Link to BCryptDestroyKey directly.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 20:50:13 +02:00
Dmitry Timoshkov
6bc7a65ef9
crypt32/tests: Link to CryptAcquireContext directly.
...
encode.c tests already do that.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 20:50:09 +02:00
Dmitry Timoshkov
8601953ebd
crypt32/tests: Add a test to verify certificate signature.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 20:50:04 +02:00
Dmitry Timoshkov
9d1ae850df
crypt32: Add support for importing RSA public keys with BCrypt.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50925
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:34:50 +02:00
Dmitry Timoshkov
c2c7946680
crypt32: Implement CryptImportPublicKeyInfoEx2.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:34:43 +02:00
Piotr Caban
c53d6a4a7c
crypt32: Also import user/admin defined root certificates on macOS.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-25 21:04:10 +01:00
Francois Gouget
7cd5cc2ecb
crypt32/tests: Fix a registerOIDInfo() failure when missing elevated privileges.
...
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-17 10:46:42 +01:00
Dmitry Timoshkov
cd9a510bce
crypt32/tests: Add some tests for CRYPT_KEY_PROV_INFO certificate property.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50024
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 21:23:27 +01:00
Dmitry Timoshkov
01d7953189
crypt32: Fix reading and writing CRYPT_KEY_PROV_INFO certificate property.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50024
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 21:23:27 +01:00
Dmitry Timoshkov
d3a4477bad
crypt32: Add support for CRYPT_STRING_HEX to CryptBinaryToStringW.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Paul Gofman
11d09da60f
crypt32: 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
Dmitry Timoshkov
4da1bca7c5
crypt32: Add support for CMSG_ENCODED_MESSAGE for a being decoded signed message.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 11:16:31 +01:00
Dmitry Timoshkov
4c9c6ca417
crypt32: Add support for CMSG_SIGNER_AUTH_ATTR_PARAM for a being decoded signed message.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 11:16:28 +01:00
Dmitry Timoshkov
1b87f222ed
crypt32: Make helper for copying CMSG_CMS_SIGNER_INFO attributes more generic.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 11:16:22 +01:00
Dmitry Timoshkov
0c8ce3aab5
crypt32/tests: Fix test failures under newer Windows versions.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 20:30:34 +01:00
Paul Gofman
706e35f2a2
crypt32: Fix adding trusted roots to store.
...
Fixes Steam client errors on SSL connections
(regression from bd59aa6d66
).
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Alexandre Julliard
d202e02f79
crypt32: List allowed characters instead of relying on wctype properties.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 20:15:11 +01:00
Alexandre Julliard
4120fb994a
crypt32: Use wide-character string literals.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 11:44:12 +01:00
Alexandre Julliard
03bf236961
crypt32: Build with msvcrt.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 11:41:21 +01:00
Alexandre Julliard
bd59aa6d66
crypt32: Move the root store initialization to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 11:40:55 +01:00
Alexandre Julliard
a36ff69027
crypt32: Move the GnuTLS code to a new Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 11:29:15 +01:00
Dmitry Timoshkov
7f8f424f38
crypt32: Fix conversion of CRYPT_KEY_PROV_INFO between store and certificate property.
...
Store uses relative offsets while certificate property uses pointers.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-25 20:46:44 +02:00
Hans Leidekker
547508e374
crypt32: Add support for CRYPT_MACHINE_KEYSET in PFXImportCertStore.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49857
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:45:40 +02:00
Alexandre Julliard
6d7037c9ff
crypt32: Move GnuTLS-specific helpers into the #ifdef.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 13:21:30 +02:00
Hans Leidekker
4e11e6e045
crypt32: Set key context if PKCS12_NO_PERSIST_KEY is passed, otherwise set key provider info.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-17 20:54:16 +02:00
Hans Leidekker
49165c25e8
crypt32: Store CERT_KEY_CONTEXT in a platform independent way.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49792
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-10 22:06:46 +02:00
Gijs Vermeulen
a963947322
crypt32: Remove unused variable in test_CryptBinaryToString().
...
This was missed in eb00dbd913
.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 17:21:44 +02:00