[PATCH 5/6] ncrypt: Add bitlength field to rsa key object.
Santino Mazza
mazzasantino1206 at gmail.com
Wed Feb 16 20:16:55 CST 2022
Signed-off-by: Santino Mazza <mazzasantino1206 at gmail.com>
---
dlls/ncrypt/main.c | 1 +
dlls/ncrypt/tests/ncrypt.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/ncrypt/main.c b/dlls/ncrypt/main.c
index a487c2f6059..d4761537864 100644
--- a/dlls/ncrypt/main.c
+++ b/dlls/ncrypt/main.c
@@ -241,6 +241,7 @@ SECURITY_STATUS WINAPI NCryptImportKey(NCRYPT_PROV_HANDLE provider, NCRYPT_KEY_H
key = &object->key;
key->alg = RSA;
+ key->rsa.bit_length = rsaheader->BitLength;
key->rsa.public_exp_size = rsaheader->cbPublicExp;
key->rsa.modulus_size = rsaheader->cbModulus;
if (!(key->rsa.public_exp = malloc(rsaheader->cbPublicExp)))
diff --git a/dlls/ncrypt/tests/ncrypt.c b/dlls/ncrypt/tests/ncrypt.c
index 61f9684a3c0..bde9d39c4f7 100644
--- a/dlls/ncrypt/tests/ncrypt.c
+++ b/dlls/ncrypt/tests/ncrypt.c
@@ -194,9 +194,7 @@ static void test_get_property(void)
ret = NCryptGetProperty(key, NCRYPT_LENGTH_PROPERTY, &keylength, size, &size, 0);
ok(ret == ERROR_SUCCESS, "got %#lx\n", ret);
- todo_wine {
ok(keylength == 1024, "got %lu\n", keylength);
- }
NCryptFreeObject(prov);
}
--
2.32.0
More information about the wine-devel
mailing list