|
// create a byte array to read the contents |
|
// create a byte array to read the contents |
- |
DWORD cbCert = GetFileSize(hFile, NULL);
|
+ |
DWORD cbCert = GetFileSize(hFile, NULL);
|
|
BYTE *byteCert = (BYTE *)malloc(sizeof(BYTE) * cbCert); |
|
BYTE *byteCert = (BYTE *)malloc(sizeof(BYTE) * cbCert); |
|
ReadFile(hFile, (LPVOID)byteCert, cbCert, &cbRead, NULL); |
|
ReadFile(hFile, (LPVOID)byteCert, cbCert, &cbRead, NULL); |
|
PCCERT_CONTEXT pCertCtx = CertCreateCertificateContext( |
|
PCCERT_CONTEXT pCertCtx = CertCreateCertificateContext( |