[PATCH 1/2] dssenh: testing when input signLen to CPSignHash is not 40.
Zhang Shuai
wxsxsdz at gmail.com
Sat Nov 23 16:43:38 CST 2019
Signed-off-by: Zhang Shuai <wxsxsdz at gmail.com>
---
dlls/dssenh/tests/dssenh.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/dssenh/tests/dssenh.c b/dlls/dssenh/tests/dssenh.c
index d16e936a31..6ebb328b5f 100644
--- a/dlls/dssenh/tests/dssenh.c
+++ b/dlls/dssenh/tests/dssenh.c
@@ -901,6 +901,8 @@ static void test_signhash_array(HCRYPTPROV hProv, const struct signature_test *t
ok(result, "Failed to get signature length, got %x\n", GetLastError());
ok(signLen1 == 40, "Expected a 40-byte signature, got %d\n", signLen1);
+ /* No error if input signLen is not 40 */
+ signLen1 = 39;
result = CryptSignHashA(hHash1, AT_SIGNATURE, NULL, 0, signValue1, &signLen1);
ok(result, "Failed to sign hash, got %x\n", GetLastError());
@@ -909,6 +911,8 @@ static void test_signhash_array(HCRYPTPROV hProv, const struct signature_test *t
ok(result, "Failed to get signature length, got %x\n", GetLastError());
ok(signLen2 == 40, "Expected a 40-byte signature, got %d\n", signLen2);
+ /* No error if input signLen is not 40 */
+ signLen2 = 41;
result = CryptSignHashA(hHash2, AT_SIGNATURE, NULL, 0, signValue2, &signLen2);
ok(result, "Failed to sign hash2, got %x\n", GetLastError());
--
2.19.1
More information about the wine-devel
mailing list