Hans Leidekker
2ad18d3992
bcrypt: Implement BCryptFreeBuffer().
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-06 23:07:20 +02:00
Hans Leidekker
40306db341
bcrypt: Fix array index in BCryptEnumAlgorithms().
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-06 23:07:20 +02:00
Huw Davies
ad0a18a49d
bcrypt: Use GNUTLS_DIG_UNKNOWN for an unknown digest.
...
Mainly to avoid a clang warning.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-25 17:55:05 +01:00
Hans Leidekker
48075d2a08
bcrypt: Also duplicate the public key handle in key_asymmetric_duplicate().
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 23:22:06 +01:00
Hans Leidekker
1fa5bfd7da
bcrypt: Fix DSA public key export when we don't have a private key handle.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 23:22:06 +01:00
Hans Leidekker
5b860a44a0
bcrypt: Fix RSA public key export when we don't have a private key handle.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 23:22:06 +01:00
Paul Gofman
00dfa1bd04
bcrypt: Fix ECC public key export.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-23 18:42:13 +01:00
Hans Leidekker
777cbf06d2
bcrypt: Stop passing a dummy public key to gnutls_privkey_import_dsa_raw().
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-21 11:37:46 +01:00
Hans Leidekker
b352d353b4
bcrypt: Store a public key handle instead of a blob.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-21 11:37:40 +01:00
Hans Leidekker
0c2408464c
bcrypt: Merge the various key import Unix calls into one.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-21 11:37:22 +01:00
Hans Leidekker
c1ed9ca9b1
bcrypt: Merge the various key export Unix calls into one.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-21 11:37:15 +01:00
Hans Leidekker
9176251af4
bcrypt: Call key_destroy() instead of BCryptDestroyKey().
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-21 11:36:52 +01:00
Hans Leidekker
f3d4df60ff
bcrypt: Pass the algorithm ID to key_asymmetric_create().
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-21 11:36:41 +01:00
Hans Leidekker
9ff16aa1cb
bcrypt: Return an error when BCryptFinalizeKeyPair() is called twice.
...
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
bae287a1aa
bcrypt: Implement KeyLength property.
...
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
83bb9eb9aa
bcrypt: Validate key size when importing RSA public 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-03-07 11:21:43 +01:00
Santino Mazza
b3073dc14a
bcrypt: Add support for PUBLICKEY blob types.
...
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-04 10:06:01 +01:00
Santino Mazza
94e5de6d16
bcrypt/tests: Test for invalid RSA keyblob.
...
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-02 20:17:25 +01:00
Eric Pouech
5cf4d0b6c9
bcrypt/tests: Don't outdent todo_wine*.
...
This prevents -Wmisleading-indentation warnings (Mingw GCC11).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 18:55:22 +01:00
Hans Leidekker
5ce0e86d04
bcrypt/tests: Build without -DWINE_NO_LONG_TYPES.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Hans Leidekker
045f50a78a
bcrypt: Build without -DWINE_NO_LONG_TYPES.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-02 18:43:22 +01:00
Eric Pouech
d963d056a7
bcrypt: In unixlib, don't use Windows long type.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 18:23:19 +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
Piotr Kleski
f32a9d1e20
bcrypt: Return BCryptSignHash len when only output is NULL.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52426
Signed-off-by: Piotr Kleski <piotr.kleski@mobica.com>
Signed-off-by: Michal Janiszewski <michal.janiszewski@mobica.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 18:15:40 +01:00
Hans Leidekker
ab4edfd862
bcrypt: Use CRT memory allocators.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-03 16:56:09 +01:00
Hans Leidekker
e6da4eed7e
bcrypt/tests: Link directly to functions available since Windows 7.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-03 16:56:09 +01:00
Hans Leidekker
2795c7f995
bcrypt: Add support for exporting RSA private keys.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52060
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-03 16:56:09 +01:00
Hans Leidekker
a226331851
bcrypt: Return export size from export_gnutls_datum().
...
And make zero padding explicit.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-03 16:56:08 +01:00
Alexandre Julliard
39336fd02d
bcrypt: Use the ntdll Unicode string functions instead of wine/unicode.h.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-30 22:07:20 +01:00
Paul Gofman
028837158a
bcrypt: Validate secret size in BCryptGenerateSymmetricKey().
...
Fixes online connection error in Forza Horizon 5.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-12 22:42:51 +01:00
Alexandre Julliard
fcc827d141
bcrypt: Implement Wow64 entry points in the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 11:38:45 +01:00
Alexandre Julliard
ef6e33f89f
include: Don't include wine/port.h in Unix libraries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-03 21:06:48 +01:00
Alexandre Julliard
ef9a0f3bc3
include: Don't include stdlib.h in wine/port.h.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-03 21:06:48 +01:00
Alexandre Julliard
dc3a240a2d
bcrypt: Convert the Unix library to the __wine_unix_call() interface.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 13:52:42 +02:00
Alexandre Julliard
696255907c
bcrypt: Move public key allocation to the PE side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 13:52:42 +02:00
Alexandre Julliard
52ca433e78
bcrypt: Add a helper macros to load GnuTLS optional functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 13:52:42 +02:00
Alexandre Julliard
e4f716bc26
bcrypt: Remove some no longer needed Unix backend functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 13:52:39 +02:00
Gijs Vermeulen
b3cd21c21c
bcrypt: Remove macOS backend.
...
GnuTLS has been the default since wine-3.13.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-30 20:00:34 +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
Zhiyi Zhang
caa5f68e41
bcrypt: Fix a compiler warning on Mac.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:23 +02:00
Paul Gofman
f638bd901e
bcrypt/tests: Add test for key parallel usage.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Paul Gofman
9944a7c92b
bcrypt: Synchronize symmetric key access for encrypt and decrypt.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Hans Leidekker
ae194f6997
bcrypt: Pass output length as a separate parameter to key_asymmetric_decrypt.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Hans Leidekker
3deb961583
bcrypt: Decryption with asymmetric keys is supported.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Esme Povirk
3db37dc5ae
bcrypt: Don't try to unload gnutls if loading failed.
...
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:01 +02:00
Paul Gofman
085f9fb198
bcrypt: Fix padding in format_gnutls_signature().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:37 +01:00
Paul Gofman
541356dac5
bcrypt: Pad exported datums in key_export_dsa_capi().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:37 +01:00
Paul Gofman
4bf5371011
bcrypt: Pad exported datums in key_export_ecc().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:37 +01:00
Paul Gofman
37c86663eb
bcrypt: Pad exported datums in export_gnutls_pubkey_dsa_capi().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:37 +01:00
Paul Gofman
68171b1c3a
bcrypt: Pad exported datums in export_gnutls_pubkey_dsa().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:37 +01:00