Commit d11e30e4 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

secur32: Fixed dynamic loading in schannel test.

parent e0693a18
......@@ -28,14 +28,15 @@
#include "wine/test.h"
static HMODULE secdll, crypt32dll;
static SECURITY_STATUS (SEC_ENTRY * pAcquireCredentialsHandleA)(SEC_CHAR*, SEC_CHAR*,
ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID, PCredHandle, PTimeStamp);
static ACQUIRE_CREDENTIALS_HANDLE_FN_A pAcquireCredentialsHandleA;
static FREE_CREDENTIALS_HANDLE_FN pFreeCredentialsHandle;
static PCCERT_CONTEXT (WINAPI *pCertCreateCertificateContext)(DWORD,const BYTE*,DWORD);
static BOOL (WINAPI *pCertFreeCertificateContext)(PCCERT_CONTEXT);
static BOOL (WINAPI *pCertSetCertificateContextProperty)(PCCERT_CONTEXT,DWORD,DWORD,const void*);
static SECURITY_STATUS (SEC_ENTRY * pFreeCredentialsHandle)(PCredHandle);
static BOOL (WINAPI * pCryptAcquireContextW)(HCRYPTPROV*, LPCWSTR, LPCWSTR, DWORD, DWORD);
static BOOL (WINAPI *pCryptAcquireContextW)(HCRYPTPROV*, LPCWSTR, LPCWSTR, DWORD, DWORD);
static BOOL (WINAPI *pCryptDestroyKey)(HCRYPTKEY);
static BOOL (WINAPI *pCryptImportKey)(HCRYPTPROV,CONST BYTE*,DWORD,HCRYPTKEY,DWORD,HCRYPTKEY*);
static BOOL (WINAPI *pCryptReleaseContext)(HCRYPTPROV,ULONG_PTR);
......@@ -105,12 +106,13 @@ static const BYTE selfSignedCert[] = {
static void InitFunctionPtrs(void)
{
HMODULE advapi32dll = GetModuleHandleA("advapi32.dll");
HMODULE advapi32dll;
crypt32dll = LoadLibraryA("crypt32.dll");
secdll = LoadLibraryA("secur32.dll");
if(!secdll)
secdll = LoadLibraryA("security.dll");
advapi32dll = GetModuleHandleA("advapi32.dll");
#define GET_PROC(h, func) p ## func = (void*)GetProcAddress(h, #func)
......@@ -127,6 +129,7 @@ static void InitFunctionPtrs(void)
GET_PROC(crypt32dll, CertFreeCertificateContext);
GET_PROC(crypt32dll, CertSetCertificateContextProperty);
GET_PROC(crypt32dll, CertCreateCertificateContext);
#undef GET_PROC
}
......
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