Commit Graph

60 Commits

Author SHA1 Message Date
Mohamad Al-Jaf dc702f79aa ncrypt: Map STATUS_NO_MEMORY to NTE_NO_MEMORY.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-08 11:51:22 +02:00
Mohamad Al-Jaf ff99c11b3b ncrypt/tests: Add NCryptIsAlgSupported tests.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Mohamad Al-Jaf db10be7318 ncrypt: Implement NCryptIsAlgSupported.
Microsoft Edge calls this function.

Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Mohamad Al-Jaf 807d368f1d ncrypt: Warn on invalid flags in NCryptImportKey.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-06 23:07:20 +02:00
Mohamad Al-Jaf dec096934a ncrypt: Map STATUS_NOT_SUPPORTED to NTE_NOT_SUPPORTED.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-06 23:07:20 +02:00
Santino Mazza 24914ab84b ncrypt: Implement NCryptVerifySignature.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:21:47 +02:00
Santino Mazza c20a3d8e23 ncrypt/tests: Test for NCryptVerifySignature.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:21:47 +02:00
Francois Gouget 8a5140e385 ncrypt: Fix the spelling of a FIXME() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 09:53:59 +01:00
Hans Leidekker 0f5f8f980f ncrypt: Always map bcrypt return values.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-10 18:27:43 +01:00
Santino Mazza bd55fe145e ncrypt: Implement NCryptFinalizeKey.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-10 18:27:43 +01:00
Santino Mazza 545ec32d28 ncrypt: Implement NCryptCreatePersistedKey.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-10 18:27:43 +01:00
Santino Mazza a5ba63b80a ncrypt/tests: Test for symmetric keys support.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-08 22:43:36 +01:00
Santino Mazza e679b7413e ncrypt: Make use of bcrypt for low level cryptography.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-08 22:43:36 +01:00
Santino Mazza 53cb28e6d9 ncrypt/tests: Test for NCryptSetProperty.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 22:33:54 +01:00
Santino Mazza bac61d0505 ncrypt/tests: Test for NCryptCreatePersistedKey.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 22:33:54 +01:00
Santino Mazza ebf4953e90 ncrypt: Check null handle when setting or getting properties.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 22:33:54 +01:00
Santino Mazza e08c2f35f8 ncrypt: Validate existence of property before creating one.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 22:33:54 +01:00
Francois Gouget b2e4ce14c0 ncrypt: Add trailing linefeeds to ERR() messages.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-18 22:10:47 +01:00
Santino Mazza 12cb5d2efe ncrypt: Add NCryptVerifySignature stub.
With this change now some applications which uses ncrypt for
signature validation work.
For example, the visual studio installer (using dotnet from winetricks).

Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 22:16:02 +01:00
Santino Mazza 88e027b523 ncrypt: NCryptGetProperty should always fill result size.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 18:59:00 +01:00
Santino Mazza 9b1c28e84b ncrypt: Set a couple of key properties.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 18:58:55 +01:00
Hans Leidekker 26d8f33479 ncrypt: Fix resizing property array.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 18:58:45 +01:00
Hans Leidekker 59584b996b ncrypt: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 22:05:34 +01:00
Santino Mazza b8924d9da9 ncrypt: Implement NCryptGetProperty and NCryptSetProperty.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 22:05:33 +01:00
Santino Mazza 24a4431f67 ncrypt: Implement NCryptFreeObject.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 22:05:33 +01:00
Santino Mazza ea3d15f2ec ncrypt/tests: Test NCryptFreeObject function.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 22:05:33 +01:00
Santino Mazza 2252613aba ncrypt: Implement NCryptImportKey function.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 22:05:33 +01:00
Santino Mazza cf3517b790 ncrypt: Make NCryptOpenStorageProvider return a valid stub pointer.
Some applications crash when the storage provider is null.

Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 22:05:33 +01:00
Santino Mazza e7a91b0a1c ncrypt/tests: Test key import of an rsa key.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 22:59:53 +01:00
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
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
Alexandre Julliard a3a0fc94e2 ncrypt: Use --prefer-native instead of DLL_WINE_PREATTACH.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Vitaly Lipatov 98c67d8679 ncrypt: Add NCryptIsKeyHandle stub.
Signed-off-by: Vitaly Lipatov <lav@etersoft.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 10:23:59 +01:00
Hans Leidekker 0e17045288 bcrypt: Implement BCryptDeriveKeyCapi.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:14 +02:00
Joseph Kogut 1f75b08127 ncrypt: Add NCryptIsAlgSupported stub.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 11:32:49 +02:00
Joseph Kogut 0ea8128a88 ncrypt: Add NCryptDeleteKey stub.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 11:32:45 +02:00
Joseph Kogut 94e38a6126 ncrypt: Add NCryptImportKey stub.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 11:32:32 +02:00
Joseph Kogut 9ea80d88b9 ncrypt: Add NCrypt{Get,Set}Property stubs.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 11:32:28 +02:00
Joseph Kogut ff885a810d ncrypt: Add NCryptFreeBuffer stub.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 11:32:22 +02:00
Joseph Kogut 2f6735e821 ncrypt: Add NCryptEnumKeys stub.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 11:32:17 +02:00
Joseph Kogut 2321adb1c8 ncrypt: Add NCryptEnumAlgorithms stub.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 11:32:08 +02:00
Hans Leidekker 98b230f851 bcrypt: Implement BCryptSignHash.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:18 +02:00
Hans Leidekker c1746612b2 bcrypt: Add stub implementations of BCryptEnumContextFunctions and BCryptFreeBuffer.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:47:32 +02:00
Alexandre Julliard 1c6256575b ncrypt: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-14 09:28:14 +02:00
Alistair Leslie-Hughes eb615ea0cb bcrypt: Add BCryptDeriveKey stub.
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-05-28 12:06:46 +02:00
Alistair Leslie-Hughes 08bc5b0d34 bcrypt: Add BCryptDestroySecret/BCryptSecretAgreement stubs.
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-05-28 12:06:46 +02:00
Hans Leidekker f0a18f6f19 bcrypt: Implement BCryptDeriveKeyPBKDF2.
Based on a patch by Jack Grigg.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42704
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Hans Leidekker 73b695f059 bcrypt: Implement BCryptGenerate/FinalizeKeyPair for ECDH P256.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46564
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Michael Müller 76b6c360fa bcrypt: Implement importing of ECDSA keys.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-26 21:06:04 +02:00
Michael Müller cb0a960ff6 bcrypt: Implement BCryptDuplicateKey.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 11:41:05 +01:00