Michael Stefaniuc
d541f5cffe
bcrypt/tests: Use wide-char string literals.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 10:46:04 +02:00
Hans Leidekker
f79ca651ae
bcrypt: Add support for importing legacy DSA public keys.
...
This is not supported on native but it will be useful to implement public key
import in dssenh.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 21:47:56 +02:00
Hans Leidekker
2a91b0bead
bcrypt: Add support for exporting legacy DSA public keys.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 21:47:56 +02:00
Hans Leidekker
a729efb964
bcrypt: Convert legacy DSA key parameters to and from little-endian format.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 21:47:56 +02:00
Hans Leidekker
7d54f9a87f
bcrypt: Fix buffer size query in BCryptExportKey.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 21:47:56 +02:00
Hans Leidekker
ab0a7d2a1b
bcrypt: Fix buffer size query in BCryptSignHash.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 21:47:56 +02:00
Alexandre Julliard
c4383013aa
bcrypt: Build with msvcrt.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 15:46:32 +02:00
Alexandre Julliard
a472ad191f
bcrypt: Move the backend code to a new Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 15:37:29 +02:00
Alexandre Julliard
209b968efc
bcrypt: Split the key structure into generic and backend-specific parts.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 15:28:49 +02:00
Alexandre Julliard
f0e1384777
bcrypt: Add separate backend functions for destroying symmetric/asymmetric keys.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 14:23:40 +02:00
Alexandre Julliard
4590465613
bcrypt: Move the symmetric key initialization to the generic code.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 14:12:19 +02:00
Alexandre Julliard
b8ada902d1
bcrypt: Move setting a symmetric key vector to the generic code.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 13:58:56 +02:00
Alexandre Julliard
54c1b0ac26
bcrypt: Move the public key initialization to the generic code.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 13:47:14 +02:00
Alexandre Julliard
d70c8e464a
bcrypt: Add a helper function to create an asymmetric key.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 13:35:22 +02:00
Rémi Bernon
4ee4fffafa
bcrypt: Export ECDSA/ECDH blobs with the correct header magic.
...
This fixes Flight Simulator XAL authentication error message.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 12:57:47 +02:00
Rémi Bernon
4bc5b822f6
bcrypt: Return STATUS_INVALID_PARAMETER on ECC magic mismatch.
...
Flight Simulator XAL authentication hits this condition because of
buggy bcrypt private key export (see next patch).
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 12:57:35 +02:00
Hans Leidekker
d17b118f03
bcrypt: Allow importing private ECDSA keys.
...
Based on a patch by Derek Lesho.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-29 21:26:35 +02:00
Brendan Shanks
e6314baa5e
bcrypt: Add tests for BCryptSecretAgreement/BCryptDestroySecret/BCryptDeriveKey.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 22:19:58 +02:00
Brendan Shanks
e763821cf4
bcrypt: Improve BCryptSecretAgreement/BCryptDestroySecret/BCryptDeriveKey stubs.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 22:19:56 +02:00
Zebediah Figura
46eac8de74
bcrypt/tests: Fix some failures on Windows 7.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Hans Leidekker
ec3ca4ee73
bcrypt: Handle different sized R/S signature components.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Huw Davies
8a43688b3d
bcrypt: Add stubs for DSS private key functions on macOS.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Hans Leidekker
7cf9a75dfa
bcrypt: Add support for importing and exporting DSS private keys.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:46:30 +02:00
Hans Leidekker
c2a4a4ec3c
bcrypt: Add support for BCRYPT_DSA_ALGORITHM.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02: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
Alexandre Julliard
3caa333127
bcrypt: 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
2bd5a8d572
bcrypt: Support retrieving the PaddingSchemes property for RSA.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:05:00 +01:00
Hans Leidekker
215c171891
bcrypt: Support BCRYPT_HASH_REUSABLE_FLAG in BCryptOpenAlgorithmProvider.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 22:39:59 +01:00
Michael Stefaniuc
7485362fa1
bcrypt/tests: Get rid of strcmp_wa().
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:54:01 +01:00
Francois Gouget
c9f9f83631
bcrypt: Make format_gnutls_signature() static.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:03 +01:00
Derek Lesho
c2840dce7f
bcrypt/tests: Add tests for BCRYPT_KDF_HASH.
...
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:10:38 +01:00
Derek Lesho
044d585151
bcrypt/tests: Add test for BCryptSecretAgreement.
...
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:10:35 +01:00
Derek Lesho
ff91d9473a
bcrypt: Add fallback when gnutls_decode_rs_value isn't present.
...
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 10:33:11 +01:00
Derek Lesho
741f8ae24e
bcrypt: Add more BCryptSignHash tests.
...
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Hans Leidekker
1703ac54fa
bcrypt: Handle SHA1 hash in key_asymmetric_verify.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Derek Lesho
741f76fc2c
bcrypt: Add support for signing hashes with ECDSA keys.
...
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Hans Leidekker
f4d6df8947
bcrypt: Avoid recreating cipher handles when the initialization vector doesn't change.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 16:03:50 +01:00
Hans Leidekker
02723a8856
bcrypt: Avoid recreating the hash on every iteration in BCryptDeriveKeyPBKDF2.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 19:17:36 +02:00
Hans Leidekker
04631f9c6e
bcrypt: Implement BCryptEnumAlgorithms.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Alistair Leslie-Hughes
e95215d08c
bcrypt: Fix key_asymmetric_init function for macos.
...
Regression introduced in 98b230f851
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-09-24 17:28:45 +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
b2bbb6f48f
bcrypt: Add support for generating RSA keys.
...
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
691fcebf3d
bcrypt: Ignore the size parameter in BCRYPT_CHAINING_MODE setters.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47432
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-05 17:38:04 +02:00
Hans Leidekker
4c649116a5
bcrypt: Add support for BCRYPT_RSA_SIGN_ALGORITHM.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47371
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:47:34 +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
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
98ea906b96
bcrypt: Implement BCRYPT_HASH_REUSABLE_FLAG.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:32:00 +01: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
158ce169e4
bcrypt: Add support for importing and exporting ECC private keys.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00