Commit 88e027b5 authored by Santino Mazza's avatar Santino Mazza Committed by Alexandre Julliard

ncrypt: NCryptGetProperty should always fill result size.

parent 9b1c28e8
......@@ -165,11 +165,8 @@ SECURITY_STATUS WINAPI NCryptGetProperty(NCRYPT_HANDLE handle, const WCHAR *name
if (flags) FIXME("flags %#lx not supported\n", flags);
if (!(property = get_object_property(object, name))) return NTE_INVALID_PARAMETER;
if (!output)
{
*result = property->value_size;
return ERROR_SUCCESS;
}
*result = property->value_size;
if (!output) return ERROR_SUCCESS;
if (outsize < property->value_size) return NTE_BUFFER_TOO_SMALL;
memcpy(output, property->value, property->value_size);
......
......@@ -186,9 +186,7 @@ static void test_get_property(void)
value[0] = 0;
ret = NCryptGetProperty(key, NCRYPT_ALGORITHM_GROUP_PROPERTY, (BYTE *)value, sizeof(value), &size, 0);
ok(ret == ERROR_SUCCESS, "got %#lx\n", ret);
todo_wine {
ok(size == 8, "got %lu\n", size);
}
ok(!lstrcmpW(value, L"RSA"), "The string doesn't match with 'RSA'\n");
size = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment