Commit Graph

2011 Commits

Author SHA1 Message Date
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
Jeff Smith a9e6f9aa71 crypt32: Make CryptBinaryToStringA fill short base64 buffer correctly.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-09 20:50:46 +02:00
Jeff Smith e0708d0601 crypt32: Fix CryptBinaryToString return value on short base64 buffer.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-09 20:50:44 +02:00
Jeff Smith 6cbedfa65b crypt32/tests: Tidy up unexpected length failure messages in base64.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-09 20:50:42 +02:00
Alex Henrie 9b87b610eb crypt32: Factor out sprintf calls in trust_status_to_str (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 10:15:40 +02:00
Gijs Vermeulen 1eca63440d crypt32/tests: Fix some memory leaks (Valgrind).
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-22 19:16:05 +02:00
Alexandre Julliard 9e9b28a179 crypt32: Fix comparison of domain name components.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:46:52 +02:00
Dmitry Timoshkov 1875620466 crypt32: CryptMsgUpdate should skip broken certificates.
CertOpenStore() already verifies the certificate before adding it
to the memory store from the file, this patch makes CryptMsgUpdate()
behave in a similar way.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45757
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:06:47 +02:00
Piotr Caban 57a8c4dbe8 crypt32: Don't use strncasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 20:27:39 +02:00
Michael Stefaniuc 3e8720ae5a crypt32: Remove an unused return variable (coccinelle).
returnvar.cocci from the Linux kernel.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-27 20:20:14 +01:00
Vijay Kiran Kamuju 0d0906b56d crypt32: Add CMSG_SIGNER_UNAUTH_ATTR_PARAM implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37837
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-19 13:10:22 +01:00
Michael Stefaniuc e02d441ebf crypt32: Remove useless cast to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-12 23:02:28 +01:00
Alexandre Julliard 5cfeed5397 crypt32: Don't build password_to_ascii without GnuTLS.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 18:32:12 +01:00
Andrey Gusev 15b7112d07 crypt32: Remove duplicate condition in CRYPT_AsnDecodeNameValueInternal().
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 18:32:00 +01:00
Hans Leidekker cf9b492fec crypt32/tests: Show that PFXImportCertStore doesn't set CERT_KEY_PROV_INFO_PROP_ID.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-07 22:44:26 +01:00
Dmitry Timoshkov 23f97773ee crypt32: CryptAcquireCertificatePrivateKey should look up certificate in the user's store if not linked to a provider.
Under Windows passing to CryptAcquireCertificatePrivateKey() a certificate
retrieved from the key container using CryptGetKeyParam(KP_CERTIFICATE) +
CertCreateCertificateContext() works although such a certificate doesn't
have assigned properties at all. In order for this to work Windows probably
looks up an original certificate in the user's private store.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 19:57:27 +01:00
Hans Leidekker 962aed5120 crypt32: Add support for PFX objects in CryptQueryObject.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-04 15:41:09 +01:00
Dmitry Timoshkov fca88e169a crypt32: Simplify the code.
cache can't be FALSE at this point.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 13:27:11 +01:00
Dmitry Timoshkov df173bd097 crypt32: Add support for CRYPT_ACQUIRE_SILENT_FLAG to CryptAcquireCertificatePrivateKey.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 13:26:59 +01:00
Dmitry Timoshkov e020d6c99d crypt32: Add support for CERT_COMPARE_KEY_IDENTIFIER to CertFindCertificateInStore.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 13:26:18 +01:00
Alistair Leslie-Hughes 66ca1fa4bd crypt32: Fix compile error on older gnutls.
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-01-31 13:25:38 +01:00
Hans Leidekker 5b465c5096 crypt32: Support password protected PFX blobs.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-30 18:33:01 +01:00
Hans Leidekker 6dba4f7895 crypt32: Add support for importing RSA private keys from PFX blobs.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-30 18:32:58 +01:00
Alistair Leslie-Hughes 02e2659a4e crypt32: Fix compile error on older gnutls.
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-01-30 18:29:14 +01:00
Orhan Kavrakoğlu 558cdd7a2b crypt32/tests: Add tests for CryptHashCertificate2.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46516
Signed-off-by: Orhan Kavrakoğlu <aibok42@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 17:12:13 +01:00
Orhan Kavrakoğlu d3c606954b crypt32: Implement CryptHashCertificate2.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46516
Signed-off-by: Orhan Kavrakoğlu <aibok42@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 17:12:13 +01:00
Hans Leidekker 226fd5cb23 crypt32: Initial implementation of PFXImportCertStore.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 17:12:13 +01:00
Orhan Kavrakoğlu 7ab111aabb crypt32: Add CryptImportPublicKeyInfoEx2 stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46516
Signed-off-by: Orhan Kavrakoğlu <aibok42@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 10:22:40 +01:00
Dmitry Timoshkov ca683382e0 crypt32: Make sure that the provider supports the specified hash algorithm.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:41:49 +01:00
Dmitry Timoshkov 34a89805e3 crypt32: Make sure that the provider supports the specified signature algorithm.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:41:47 +01:00
Gijs Vermeulen a15d4de557 crypt32/tests: Fix a memory leak (Valgrind).
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-15 17:17:30 +01:00
Gijs Vermeulen 8e0139af2a crypt32/tests: Fix a typo in ok() message.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-14 18:18:39 +01:00
Dmitry Timoshkov ea77ba04f3 crypt32: If there is no optional parameters set rgProvParam to NULL in CRYPT_KEY_PROV_INFO.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-07 16:43:33 +01:00
Dmitry Timoshkov ee883ff659 crypt32: Pass type and flags in correct order to the find() helper.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:04 +01:00
Dmitry Timoshkov f4845059b6 crypt32: Use sizeof(WCHAR) instead of 2.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:04 +01:00
Dmitry Timoshkov a9baa25c8c crypt32: Make sure that the provider supports the specified public key algorithm.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Dmitry Timoshkov 2ef62f9085 crypt32: Make sure that the provider supports algorithm of the message being decoded.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-16 20:55:01 +01:00
Alexander Morozov 263f6ef201 crypt32: Use correct private key for signing.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-15 13:43:14 +01:00
Dmitry Timoshkov fa713c3d23 crypt32: Look for the provider that supports the specified content OID in CryptMsgOpenToEncode(CMSG_HASHED).
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 12:48:58 +01:00
Dmitry Timoshkov fd6e9ccca3 crypt32: Add support for a particular ALG_ID to I_CryptGetDefaultCryptProv.
Based on a patch by Alexander Morozov.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 12:48:36 +01:00
Dmitry Timoshkov ac758a2a80 crypt32/tests: Add more tests for I_CryptGetDefaultCryptProv.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 12:48:28 +01:00
Dmitry Timoshkov 99a2514fda crypt32: Add support for 3rd party CSPs to CertGetPublicKeyLength.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 10:35:51 +01:00
Dmitry Timoshkov 41e0a38f7c crypt32: Directly call I_CryptGetDefaultCryptProv to make hooking from a 3rd party CSP work.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 10:35:45 +01:00
Dmitry Timoshkov 3b1e55d093 crypt32: CryptFreeOIDFunctionAddress should not unload a registered module.
MSDN states that hModule passed to CryptInstallOIDFunctionAddress() should be
used to prevent this module to be unloaded by CryptFreeOIDFunctionAddress in
case the provider's DLL uses CryptRegisterOIDFunction to add its own entries.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Dmitry Timoshkov 787133fc21 crypt32: Add CryptSetKeyIdentifierProperty stub.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Dmitry Timoshkov 8f488a71b9 crypt32: CertComparePublicKeyInfo should not try to decode a non-RSA public key.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 21:18:27 +02:00