#include <wine/test.h>
-static BOOL (WINAPI *pCertAddStoreToCollection)(HCERTSTORE,HCERTSTORE,DWORD,DWORD);
static PCCERT_CONTEXT (WINAPI *pCertCreateSelfSignCertificate)(HCRYPTPROV_OR_NCRYPT_KEY_HANDLE,PCERT_NAME_BLOB,DWORD,PCRYPT_KEY_PROV_INFO,PCRYPT_ALGORITHM_IDENTIFIER,PSYSTEMTIME,PSYSTEMTIME,PCERT_EXTENSIONS);
static BOOL (WINAPI *pCertGetValidUsages)(DWORD,PCCERT_CONTEXT*,int*,LPSTR*,DWORD*);
static BOOL (WINAPI *pCryptAcquireCertificatePrivateKey)(PCCERT_CONTEXT,DWORD,void*,HCRYPTPROV_OR_NCRYPT_KEY_HANDLE*,DWORD*,BOOL*);
if(!p ## func) \
trace("GetProcAddress(%s) failed\n", #func);
- GET_PROC(hCrypt32, CertAddStoreToCollection)
GET_PROC(hCrypt32, CertCreateSelfSignCertificate)
GET_PROC(hCrypt32, CertGetValidUsages)
GET_PROC(hCrypt32, CryptAcquireCertificatePrivateKey)
collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0,
CERT_STORE_CREATE_NEW_FLAG, NULL);
ok(collection != NULL, "CertOpenStore failed: %08x\n", GetLastError());
- if (collection && pCertAddStoreToCollection)
+ if (collection)
{
/* Add store to the collection, but disable updates */
- pCertAddStoreToCollection(collection, store, 0, 0);
+ CertAddStoreToCollection(collection, store, 0, 0);
context = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert2,
sizeof(bigCert2));
oids[i]);
HeapFree(GetProcessHeap(), 0, oids);
}
- numOIDs = size = 0xdeadbeef;
+ numOIDs = 0xdeadbeef;
/* Oddly enough, this crashes when the number of contexts is not 1:
ret = pCertGetValidUsages(2, contexts, &numOIDs, NULL, &size);
* but setting size to 0 allows it to succeed:
"expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n",
status.dwError);
ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex);
- ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex);
/* Now add a CRL to the hCrlStore */
revPara.hCrlStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
CERT_STORE_CREATE_NEW_FLAG, NULL);