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
Serge Gautherie
3e8b07309c
crypt32: Check CRYPT_ConstructBitBlob() return value in CRYPT_ExportKeyTrans().
...
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 20:06:38 +02:00
Dmitry Timoshkov
fd1be205ba
crypt32: Store CRYPT_KEY_PROV_INFO in a platform independent way.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 12:25:09 +02:00
Rémi Bernon
4e94e21060
crypt32/tests: Fix signed integral cast warning.
...
First cast to int, then to DWORD.
Reported by MinGW GCC 10 with -Woverflow.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:47:49 +02:00
Dmitry Timoshkov
0e30815636
crypt32: pwszContainerName or pwszProvName could be NULL in CRYPT_KEY_PROV_INFO.
...
Make behaviour of CRYPT_FixKeyProvInfoPointers match
CRYPT_CopyKeyProvInfo, and fix reading CRYPT_KEY_PROV_INFO certificate
property from the store.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-21 20:25:50 +02:00
Hans Leidekker
1f27719007
crypt32: Microsoft root policy does not include the base policy.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 17:33:37 +02:00
Hans Leidekker
403b83fdb1
crypt32: Recognize 'Microsoft Root Certificate Authority 2010' when verifying the Microsoft root policy.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 17:33:34 +02:00
Alexandre Julliard
12157fac9f
crypt32: Use standard dlopen() instead of the libwine wrappers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:41 +02:00
Hans Leidekker
583ca55613
crypt32/tests: Update *.winehq.org certificate.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-25 23:43:18 +01:00
Nikolay Sivov
3d69d71e9e
crypt32: Fix CryptBinaryToStringW() to return required length properly.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 22:39:59 +01:00
Nikolay Sivov
eb00dbd913
crypt32/tests: Detect missing HEXRAW support by output.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 22:39:59 +01:00
Daniel Lehman
f92581ee82
crypt32: Implement CryptBinaryToStringW(HEXRAW).
...
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Ilia Mirkin
8ca8fa87fa
crypt32/tests: Additional test for skipping unknown CAs.
...
This is already tested by setting a flag in the ssl policy parameters,
but apparently the flag in base policy parameters also needs to be
respected. Tested on Win7.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-06 22:51:28 +01:00
Ilia Mirkin
5011815d62
crypt32: Also check CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG.
...
It appears that the untrusted root check should be skipped if this flag
is set even if the ExtraPolicyPara one is not set.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48495
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-06 22:51:17 +01:00
Jacek Caban
275f6ca3df
crypt32: Allow only ASCII digits in CRYPT_AsnEncodeNumericString.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-06 21:40:22 +01:00
Alexandre Julliard
d5a5f53b58
crypt32/tests: Get rid of strncmpW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-26 10:59:43 +01:00
Michael Cronenworth
5740b735cd
crypt32: 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:13:53 +01:00
Andrey Gusev
a966ee7f4e
crypt32: Fix a typo in comment.
...
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:06:33 +01:00
Michael Müller
5b62f89baa
crypt32: Add MS root CA 2010.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47626
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 22:00:00 +01:00
Zebediah Figura
14fd1ccdc6
crypt32/tests: Clean up test_format_object().
...
Get rid of no longer needed workarounds, and handle a broken case in Windows 10.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:33:51 +01:00