crypt32/tests: Link to BCryptDestroyKey directly.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2021-04-14 13:15:00 +03:00 committed by Alexandre Julliard
parent 6bc7a65ef9
commit 67c8ffc847
1 changed files with 2 additions and 6 deletions

View File

@ -30,7 +30,6 @@
static BOOL (WINAPI *pCryptDecodeObjectEx)(DWORD,LPCSTR,const BYTE*,DWORD,DWORD,PCRYPT_DECODE_PARA,void*,DWORD*);
static BOOL (WINAPI *pCryptEncodeObjectEx)(DWORD,LPCSTR,const void*,DWORD,PCRYPT_ENCODE_PARA,void*,DWORD*);
static DWORD (WINAPI *pBCryptDestroyKey)(BCRYPT_KEY_HANDLE);
struct encodedInt
{
@ -8475,7 +8474,7 @@ static void testImportPublicKey(HCRYPTPROV csp, PCERT_PUBLIC_KEY_INFO info)
ret = CryptImportPublicKeyInfoEx2(X509_ASN_ENCODING,
&context->pCertInfo->SubjectPublicKeyInfo, 0, NULL, &key2);
ok(ret, "CryptImportPublicKeyInfoEx2 failed: %08x\n", GetLastError());
if (pBCryptDestroyKey) pBCryptDestroyKey(key2);
BCryptDestroyKey(key2);
CertFreeCertificateContext(context);
}
@ -8510,7 +8509,7 @@ START_TEST(encode)
{
static const DWORD encodings[] = { X509_ASN_ENCODING, PKCS_7_ASN_ENCODING,
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING };
HMODULE hCrypt32, hBcrypt;
HMODULE hCrypt32;
DWORD i;
hCrypt32 = GetModuleHandleA("crypt32.dll");
@ -8522,9 +8521,6 @@ START_TEST(encode)
return;
}
hBcrypt = GetModuleHandleA("bcrypt.dll");
pBCryptDestroyKey = (void*)GetProcAddress(hBcrypt, "BCryptDestroyKey");
for (i = 0; i < ARRAY_SIZE(encodings); i++)
{
test_encodeInt(encodings[i]);