Commit graph

214 commits

Author SHA1 Message Date
Paul Gofman 7300b40b47 crypt32: Mind constructor tag in CRYPT_AsnDecodeOCSPSignatureInfoCertEncoded(). 2024-04-25 12:55:00 +02:00
Alexandre Julliard febb06ce77 crypt32: Use nameless union/structs. 2023-07-05 17:03:30 +02:00
Hans Leidekker d393709fe4 crypt32: Parse OCSP responder name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53813
2022-10-21 23:18:11 +02:00
Alistair Leslie-Hughes 42bd5ea4c4 crypt32: Only report Unimplemented decoder when not found in external dll.
Some applications spam this fixme.
fixme:cryptasn:CRYPT_GetBuiltinDecoder Unsupported decoder for lpszStructType 1.3.6.1.4.1.311.2.1.4

This OID is supported in wintrust.dll which crypt32 uses, so this console fixme doesn't make sense.
The fixme will only appear if no support for the requested decoder is available.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53800
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2022-10-19 18:48:30 +02:00
Paul Gofman cc3fc9a47d crypt32: Set correct exponent length in decoded BCRYPT_RSAKEY_BLOB. 2022-09-30 11:53:35 +02:00
Hans Leidekker 8a463a335b crypt32: Add support for decoding OCSP_BASIC_REVOKED_INFO structures.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-24 12:03:53 +02:00
Hans Leidekker f04b102484 crypt32: Add partial support for decoding OCSP_BASIC_RESPONSE_INFO structures.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-25 17:56:39 +01:00
Hans Leidekker 0b350ab967 crypt32: Add support for decoding signed OCSP responses.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-15 18:05:27 +01:00
Hans Leidekker 3b90b7be75 crypt32: Add support for decoding OCSP responses.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-10 18:27:43 +01:00
Eric Pouech 5fc99b35ba crypt32: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +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
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
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
Alexandre Julliard 03bf236961 crypt32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 11:41:21 +01: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
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
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 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
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 98fad7df79 crypt32: Forward CryptDecodeObject to CryptDecodeObjectEx.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:32:03 +02:00
Dmitry Timoshkov 855dab34bd crypt32: Make it clear that LocalAlloc should return a pointer.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:32:03 +02:00
Michael Müller 718e9dce9c crypt32: Implement decoding of X509_ECC_SIGNATURE.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-20 11:23:20 +02:00
Michael Müller d791d36a9b crypt32: Implement decoding of X509_OBJECT_IDENTIFIER.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-20 11:23:16 +02:00
Nikolay Sivov 6de2e83e00 crypt32: Use ARRAY_SIZE macro.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-20 11:23:06 +02:00
Jacek Caban 2a2ecdd564 crypt32: Fixed decoded size calculation in CRYPT_AsnDecodeSequence when indefinite length is used.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:53 +01:00
Jacek Caban 7a5209c66e crypt32: Support constructed strings in octet strings decoder.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:52 +01:00
Vincent Povirk 8327b063bc crypt32: Zero-pad RSA Private Key values as needed to fit PRIVATEKEYBLOB.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-14 12:45:15 +09:00
Nikolay Sivov 55e3a03ba3 crypt32: Fix tracing of out argument (Coverity). 2015-06-08 15:30:05 +09:00
Vincent Povirk 7fb8ee1995 crypt32: Implement PKCS_RSA_PRIVATE_KEY decoding. 2015-02-27 14:20:23 +09:00
Michael Stefaniuc ab270d433f crypt32: Use assignment instead of memcpy to copy a struct. 2013-01-24 15:38:56 +01:00
Marcus Meissner 9a51a9926a crypt32: Initialize bytesNeeded (Coverity). 2012-10-12 13:20:42 +02:00
Michael Stefaniuc 2793be9c6d crypt32: Avoid TRUE:FALSE conditional expressions. 2012-08-13 11:49:49 +02:00
Henri Verbeet db15675280 crypt32: Use a larger temporary buffer in CRYPT_AsnDecodeOidIgnoreTag(). 2012-01-26 17:44:37 +01:00
Alexander Morozov 9d63e6f944 crypt32: Initialize a pointer for dynamic data. 2011-11-22 18:24:41 +01:00
Louis Lenders e11e1841f3 crypt32: Add stub for PFXVerifyPassword. 2011-06-03 17:36:09 +02:00
Juan Lang d51a7940bc crypt32: Fix memory leaks when decoding fails (valgrind). 2011-01-19 12:22:48 +01:00
Marcus Meissner 896be41143 crypt32: Handle NULL ptr leak in CryptDecodeObjectEx (Coverity). 2011-01-03 11:28:08 +01:00
Michael Stefaniuc ef39e0ec1a crypt32: Don't open code CONTAINING_RECORD(). 2010-12-29 11:59:34 +01:00
Alexander Morozov dd75ab38c6 crypt32: Implement decoding enveloped messages. 2010-12-16 11:22:54 +01:00
Andrew Talbot 28e1ec4467 crypt32: Constify some variables. 2010-08-16 13:46:37 +02:00
Alexandre Julliard 87416f5a3b crypt32: Fix computation of structure sizes in CRYPT_AsnDecodeSequence. 2010-04-07 23:07:43 +02:00
Michael Stefaniuc 0a866d0e45 crypt32: Avoid using HIWORD() on a string pointer.
The stray IS_INTRESOURCE() is applied to a true resource. The other
strings are OIDs and not resources.
2010-01-29 14:59:02 +01:00
Juan Lang 91fbdb561a crypt32: The KeyId member of an authority key identifier is an octet string, not an integer. 2009-12-03 10:16:53 +01:00
Juan Lang 25e8f27817 crypt32: Disallow embedded NULLs in alternate names. 2009-11-10 13:07:28 +01:00
Juan Lang e7404ba24f crypt32: Fix decoding names when CRYPT_DECODE_ALLOC_FLAG is not specified. 2009-11-10 13:05:40 +01:00
Juan Lang 6cefdef501 crypt32: Fix decoding unicode names when CRYPT_DECODE_ALLOC_FLAG is not specified. 2009-11-10 13:05:35 +01:00
Juan Lang fbcce9f308 crypt32: Implement decoding cert policy constraints. 2009-11-09 19:58:34 +01:00
Juan Lang 7e7e73d0da crypt32: Implement decoding cert policy mappings. 2009-11-09 19:58:13 +01:00
Juan Lang ed9a4ffa0b crypt32: Fix decoding cert issuer/subject unique ids. 2009-11-09 19:57:51 +01:00