mirror of
https://github.com/reactos/wine.git
synced 2025-02-25 15:33:47 +00:00
bcrypt: Return error when requesting BCRYPT_HASH_LENGTH for unsupported object.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ced491c65f
commit
eecb068ac0
@ -404,6 +404,8 @@ static NTSTATUS generic_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *
|
||||
|
||||
if (!strcmpW( prop, BCRYPT_HASH_LENGTH ))
|
||||
{
|
||||
if (!alg_props[id].hash_length)
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
*ret_size = sizeof(ULONG);
|
||||
if (size < sizeof(ULONG))
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
|
@ -763,6 +763,10 @@ static void test_rng(void)
|
||||
ret = pBCryptGetProperty(alg, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
|
||||
ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
|
||||
|
||||
len = size = 0xdeadbeef;
|
||||
ret = pBCryptGetProperty(alg, BCRYPT_HASH_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
|
||||
ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
|
||||
|
||||
test_alg_name(alg, "RNG");
|
||||
|
||||
memset(buf, 0, 16);
|
||||
|
Loading…
x
Reference in New Issue
Block a user