36 BYTE blobbin[] = {0x02,0x01,0x01};
37 static CHAR oid[] =
"1.2.3";
57 "Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n",
GetLastError(),
81 static CHAR oid[] =
"1.2.3";
82 BYTE blobbin[] = {0x02,0x01,0x01};
102 "Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n",
GetLastError(),
126 static CHAR oid[] =
"1.2.3";
127 BYTE bin[] = { 0x16,0x09,
'J',
'u',
'a',
'n',
' ',
'L',
'a',
'n',
'g' };
145 "Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n",
GetLastError(),
181 ok(
ret == 1,
"Expected 1, got %d\n",
ret);
182 info.NotAfter = fileTime;
185 ok(
ret == 0,
"Expected 0, got %d\n",
ret);
187 info.NotBefore = fileTime;
188 info.NotBefore.dwLowDateTime += 5000;
190 ok(
ret == -1,
"Expected -1, got %d\n",
ret);
225 index = pI_CryptAllocTls();
232 ok(!
ptr,
"Expected NULL\n");
236 ok(
ptr == (
LPVOID)0xdeadbeef,
"Expected 0xdeadbeef, got %p\n",
ptr);
243 ok(!
ret,
"I_CryptFreeTls succeeded\n");
248 index = pI_CryptAllocTls();
255 ok(!
ptr,
"Expected NULL\n");
259 ok(
ptr == (
LPVOID)0xdeadbeef,
"Expected 0xdeadbeef, got %p\n",
ptr);
261 ok(
ptr == (
LPVOID)0xdeadbeef,
"Expected 0xdeadbeef, got %p\n",
ptr);
263 ok(!
ptr,
"Expected NULL\n");
272 pReadDWORD = (
void *)
GetProcAddress(
hCrypt,
"I_CryptReadTrustedPublisherDWORDValueFromRegistry");
275 static const WCHAR safer[] = {
276 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
277 'P',
'o',
'l',
'i',
'c',
'i',
'e',
's',
'\\',
278 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
'S',
'y',
's',
't',
'e',
'm',
279 'C',
'e',
'r',
't',
'i',
'f',
'i',
'c',
'a',
't',
'e',
's',
'\\',
280 'T',
'r',
'u',
's',
't',
'e',
'd',
'P',
'u',
'b',
'l',
'i',
's',
'h',
'e',
'r',
281 '\\',
'S',
'a',
'f',
'e',
'r',0 };
282 static const WCHAR authenticodeFlags[] = {
'A',
'u',
't',
'h',
'e',
'n',
283 't',
'i',
'c',
'o',
'd',
'e',
'F',
'l',
'a',
'g',
's',0 };
285 DWORD size, readFlags = 0, returnedFlags;
292 size =
sizeof(readFlags);
298 returnedFlags = 0xdeadbeef;
299 ret = pReadDWORD(authenticodeFlags, &returnedFlags);
300 ok(
ret == exists,
"Unexpected return value\n");
301 ok(readFlags == returnedFlags,
302 "Expected flags %08x, got %08x\n", readFlags, returnedFlags);
308#define ALG(id) id, #id
336 if (!pI_CryptGetDefaultCryptProv)
return;
338 prov = pI_CryptGetDefaultCryptProv(0xdeadbeef);
344 prov = pI_CryptGetDefaultCryptProv(1);
347 prov = pI_CryptGetDefaultCryptProv(0);
348 ok(prov != 0,
"I_CryptGetDefaultCryptProv failed: %08x\n",
GetLastError());
357 prov = pI_CryptGetDefaultCryptProv(
test_prov[
i].algid);
392 "Expected %d or 0, got %d\n",(9+
i),
ret);
399 0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,
400 0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f };
402 '0',
'2',
' ',
'0',
'3',
' ',
'0',
'4',
' ',
'0',
'5',
' ',
'0',
'6',
' ',
'0',
'7',
' ',
'0',
403 '8',
' ',
'0',
'9',
' ',
'0',
'a',
' ',
'0',
'b',
' ',
'0',
'c',
' ',
'0',
'd',
' ',
'0',
'e',
404 ' ',
'0',
'f',
' ',
'1',
'0',
' ',
'1',
'1',
' ',
'1',
'2',
' ',
'1',
'3',
' ',
'1',
'4',
' ',
405 '1',
'5',
' ',
'1',
'6',
' ',
'1',
'7',
' ',
'1',
'8',
' ',
'1',
'9',
' ',
'1',
'a',
' ',
'1',
406 'b',
' ',
'1',
'c',
' ',
'1',
'd',
' ',
'1',
'e',
' ',
'1',
'f',0 };
411 DWORD dwFormatStrType,
void *pFormatStruct,
LPCSTR lpszStructType,
419 if (!pCryptFormatObject)
421 skip(
"No CryptFormatObject\n");
435 "expected ERROR_FILE_NOT_FOUND, got %d\n",
GetLastError());
448 win_skip(
"CryptFormatObject has no default implementation\n");
463 ok(!
str[0],
"expected empty string\n");
497 ok(!
ret,
"CryptFormatObject succeeded\n");
500 "expected ERROR_FILE_NOT_FOUND or no change, got %d\n",
GetLastError());
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
BOOL WINAPI CryptReleaseContext(HCRYPTPROV hProv, DWORD dwFlags)
BOOL WINAPI CryptGetProvParam(HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
PCRYPT_ATTRIBUTE WINAPI CertFindAttribute(LPCSTR pszObjId, DWORD cAttr, CRYPT_ATTRIBUTE rgAttr[])
PCERT_EXTENSION WINAPI CertFindExtension(LPCSTR pszObjId, DWORD cExtensions, CERT_EXTENSION rgExtensions[])
LONG WINAPI CertVerifyTimeValidity(LPFILETIME pTimeToVerify, PCERT_INFO pCertInfo)
PCERT_RDN_ATTR WINAPI CertFindRDNAttr(LPCSTR pszObjId, PCERT_NAME_INFO pName)
LPVOID WINAPI CryptMemAlloc(ULONG cbSize)
LPVOID WINAPI CryptMemRealloc(LPVOID pv, ULONG cbSize)
VOID WINAPI CryptMemFree(LPVOID pv)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
static const WCHAR *const ext[]
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
VOID WINAPI GetSystemTime(OUT LPSYSTEMTIME lpSystemTime)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLenum GLuint GLenum GLsizei const GLchar * buf
GLubyte GLubyte GLubyte GLubyte w
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ int __cdecl rand(void)
#define ERROR_FILE_NOT_FOUND
static void test_format_object(void)
static void test_findRDNAttr(void)
static void test_verifyTimeValidity(void)
static void test_CryptInstallOssGlobal(void)
static void test_findAttribute(void)
static void test_readTrustedPublisherDWORD(void)
static void test_getDefaultCryptProv(void)
static void test_cryptAllocate(void)
static void test_cryptTls(void)
static const WCHAR encodedIntStr[]
static void test_findExtension(void)
static const WCHAR encodedBigIntStr[]
static LPCSTR DWORD void BYTE * pbEncoded
static struct _PeImage bin
#define todo_wine_if(is_todo)
static void test_prov(void)
DWORD WINAPI GetLastError(void)
#define CERT_RDN_IA5_STRING
#define X509_ASN_ENCODING
#define szOID_AUTHORITY_KEY_IDENTIFIER2
#define CRYPT_FORMAT_STR_NO_HEX
#define HKEY_LOCAL_MACHINE