24 #define WIN32_NO_STATUS 41 static const char szKeySet[] =
"wine_test_keyset";
43 #define NON_DEF_PROV_TYPE 999 83 pCryptAcquireContextA = (
void*)
GetProcAddress(hadvapi32,
"CryptAcquireContextA");
84 pCryptEnumProviderTypesA = (
void*)
GetProcAddress(hadvapi32,
"CryptEnumProviderTypesA");
85 pCryptEnumProvidersA = (
void*)
GetProcAddress(hadvapi32,
"CryptEnumProvidersA");
86 pCryptGetDefaultProviderA = (
void*)
GetProcAddress(hadvapi32,
"CryptGetDefaultProviderA");
87 pCryptReleaseContext = (
void*)
GetProcAddress(hadvapi32,
"CryptReleaseContext");
88 pCryptSetProviderExA = (
void*)
GetProcAddress(hadvapi32,
"CryptSetProviderExA");
89 pCryptCreateHash = (
void*)
GetProcAddress(hadvapi32,
"CryptCreateHash");
90 pCryptDestroyHash = (
void*)
GetProcAddress(hadvapi32,
"CryptDestroyHash");
91 pCryptGenRandom = (
void*)
GetProcAddress(hadvapi32,
"CryptGenRandom");
92 pCryptContextAddRef = (
void*)
GetProcAddress(hadvapi32,
"CryptContextAddRef");
94 pCryptDestroyKey = (
void*)
GetProcAddress(hadvapi32,
"CryptDestroyKey");
96 pCryptDeriveKey = (
void*)
GetProcAddress(hadvapi32,
"CryptDeriveKey");
97 pCryptDuplicateHash = (
void*)
GetProcAddress(hadvapi32,
"CryptDuplicateHash");
98 pCryptDuplicateKey = (
void*)
GetProcAddress(hadvapi32,
"CryptDuplicateKey");
100 pCryptExportKey = (
void*)
GetProcAddress(hadvapi32,
"CryptExportKey");
101 pCryptGetHashParam = (
void*)
GetProcAddress(hadvapi32,
"CryptGetHashParam");
102 pCryptGetKeyParam = (
void*)
GetProcAddress(hadvapi32,
"CryptGetKeyParam");
103 pCryptGetProvParam = (
void*)
GetProcAddress(hadvapi32,
"CryptGetProvParam");
104 pCryptGetUserKey = (
void*)
GetProcAddress(hadvapi32,
"CryptGetUserKey");
105 pCryptHashData = (
void*)
GetProcAddress(hadvapi32,
"CryptHashData");
106 pCryptHashSessionKey = (
void*)
GetProcAddress(hadvapi32,
"CryptHashSessionKey");
107 pCryptImportKey = (
void*)
GetProcAddress(hadvapi32,
"CryptImportKey");
108 pCryptSignHashW = (
void*)
GetProcAddress(hadvapi32,
"CryptSignHashW");
109 pCryptSetHashParam = (
void*)
GetProcAddress(hadvapi32,
"CryptSetHashParam");
110 pCryptSetKeyParam = (
void*)
GetProcAddress(hadvapi32,
"CryptSetKeyParam");
111 pCryptSetProvParam = (
void*)
GetProcAddress(hadvapi32,
"CryptSetProvParam");
112 pCryptVerifySignatureW = (
void*)
GetProcAddress(hadvapi32,
"CryptVerifySignatureW");
113 pSystemFunction004 = (
void*)
GetProcAddress(hadvapi32,
"SystemFunction004");
114 pSystemFunction005 = (
void*)
GetProcAddress(hadvapi32,
"SystemFunction005");
115 pSystemFunction036 = (
void*)
GetProcAddress(hadvapi32,
"SystemFunction036");
127 pCryptReleaseContext(
hProv, 0);
134 pCryptReleaseContext(
hProv, 0);
139 pCryptReleaseContext(
hProv, 0);
151 pCryptReleaseContext(
hProv, 0);
158 pCryptReleaseContext(
hProv, 0);
165 pCryptReleaseContext(
hProv, 0);
214 pCryptReleaseContext(
hProv, 0);
228 pCryptReleaseContext(
hProv, 0);
258 pCryptDestroyHash(
hHash);
270 result = pCryptDestroyKey(hKey);
277 result = pCryptDestroyKey(hKey2);
299 #ifdef CRASHES_ON_NT40 318 #ifdef CRASHES_ON_NT40 322 result = pCryptDuplicateKey(hKey,
NULL, 0, &hKey2);
327 result = pCryptExportKey(hKey, 0, 0, 0, &
temp, &dwLen);
338 result = pCryptGetKeyParam(hKey, 0, &
temp, &dwLen, 0);
365 win_skip(
"CryptSignHashW is not available\n");
367 result = pCryptSetKeyParam(hKey, 0, &
temp, 1);
376 if (pCryptVerifySignatureW)
383 win_skip(
"CryptVerifySignatureW is not available\n");
388 result = pCryptDestroyKey(hKey);
393 0x07, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x52, 0x53, 0x41, 0x32, 0x00,
394 0x02, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x79, 0x10, 0x1c, 0xd0, 0x6b, 0x10,
395 0x18, 0x30, 0x94, 0x61, 0xdc, 0x0e, 0xcb, 0x96, 0x4e, 0x21, 0x3f, 0x79, 0xcd,
396 0xa9, 0x17, 0x62, 0xbc, 0xbb, 0x61, 0x4c, 0xe0, 0x75, 0x38, 0x6c, 0xf3, 0xde,
397 0x60, 0x86, 0x03, 0x97, 0x65, 0xeb, 0x1e, 0x6b, 0xdb, 0x53, 0x85, 0xad, 0x68,
398 0x21, 0xf1, 0x5d, 0xe7, 0x1f, 0xe6, 0x53, 0xb4, 0xbb, 0x59, 0x3e, 0x14, 0x27,
399 0xb1, 0x83, 0xa7, 0x3a, 0x54, 0xe2, 0x8f, 0x65, 0x8e, 0x6a, 0x4a, 0xcf, 0x3b,
400 0x1f, 0x65, 0xff, 0xfe, 0xf1, 0x31, 0x3a, 0x37, 0x7a, 0x8b, 0xcb, 0xc6, 0xd4,
401 0x98, 0x50, 0x36, 0x67, 0xe4, 0xa1, 0xe8, 0x7e, 0x8a, 0xc5, 0x23, 0xf2, 0x77,
402 0xf5, 0x37, 0x61, 0x49, 0x72, 0x59, 0xe8, 0x3d, 0xf7, 0x60, 0xb2, 0x77, 0xca,
403 0x78, 0x54, 0x6d, 0x65, 0x9e, 0x03, 0x97, 0x1b, 0x61, 0xbd, 0x0c, 0xd8, 0x06,
404 0x63, 0xe2, 0xc5, 0x48, 0xef, 0xb3, 0xe2, 0x6e, 0x98, 0x7d, 0xbd, 0x4e, 0x72,
405 0x91, 0xdb, 0x31, 0x57, 0xe3, 0x65, 0x3a, 0x49, 0xca, 0xec, 0xd2, 0x02, 0x4e,
406 0x22, 0x7e, 0x72, 0x8e, 0xf9, 0x79, 0x84, 0x82, 0xdf, 0x7b, 0x92, 0x2d, 0xaf,
407 0xc9, 0xe4, 0x33, 0xef, 0x89, 0x5c, 0x66, 0x99, 0xd8, 0x80, 0x81, 0x47, 0x2b,
408 0xb1, 0x66, 0x02, 0x84, 0x59, 0x7b, 0xc3, 0xbe, 0x98, 0x45, 0x4a, 0x3d, 0xdd,
409 0xea, 0x2b, 0xdf, 0x4e, 0xb4, 0x24, 0x6b, 0xec, 0xe7, 0xd9, 0x0c, 0x45, 0xb8,
410 0xbe, 0xca, 0x69, 0x37, 0x92, 0x4c, 0x38, 0x6b, 0x96, 0x6d, 0xcd, 0x86, 0x67,
411 0x5c, 0xea, 0x54, 0x94, 0xa4, 0xca, 0xa4, 0x02, 0xa5, 0x21, 0x4d, 0xae, 0x40,
412 0x8f, 0x9d, 0x51, 0x83, 0xf2, 0x3f, 0x33, 0xc1, 0x72, 0xb4, 0x1d, 0x94, 0x6e,
413 0x7d, 0xe4, 0x27, 0x3f, 0xea, 0xff, 0xe5, 0x9b, 0xa7, 0x5e, 0x55, 0x8e, 0x0d,
414 0x69, 0x1c, 0x7a, 0xff, 0x81, 0x9d, 0x53, 0x52, 0x97, 0x9a, 0x76, 0x79, 0xda,
415 0x93, 0x32, 0x16, 0xec, 0x69, 0x51, 0x1a, 0x4e, 0xc3, 0xf1, 0x72, 0x80, 0x78,
416 0x5e, 0x66, 0x4a, 0x8d, 0x85, 0x2f, 0x3f, 0xb2, 0xa7 };
424 BYTE bogus[] = { 0 };
426 if (!pCryptVerifySignatureW)
428 win_skip(
"CryptVerifySignatureW is not available\n");
433 ret = pCryptVerifySignatureW(0,
NULL, 0, 0,
NULL, 0);
436 win_skip(
"CryptVerifySignatureW is not implemented\n");
440 "Expected ERROR_INVALID_PARAMETER, got %08x\n",
GetLastError());
453 "Expected ERROR_INVALID_PARAMETER, got %08x\n",
GetLastError());
457 "Expected ERROR_INVALID_PARAMETER, got %08x\n",
GetLastError());
462 "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n",
468 "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n",
473 "Expected NTE_BAD_SIGNATURE, got %08x\n",
GetLastError());
475 ret = pCryptVerifySignatureW(
hash, bogus,
sizeof(bogus),
key,
NULL, 0);
479 "Expected NTE_BAD_SIGNATURE, got %08x\n",
GetLastError());
480 pCryptDestroyKey(
key);
481 pCryptDestroyHash(
hash);
482 pCryptReleaseContext(prov, 0);
530 DWORD notZeroFlags = 5;
532 if(!pCryptEnumProvidersA)
534 win_skip(
"CryptEnumProvidersA is not available\n");
540 win_skip(
"Could not find providers in registry\n");
545 result = pCryptEnumProvidersA(dwIndex, ¬Null, 0, &
type,
NULL, &providerLen);
549 result = pCryptEnumProvidersA(dwIndex,
NULL, notZeroFlags, &
type,
NULL, &providerLen);
554 providerLen = cbName / 2;
558 result = pCryptEnumProvidersA(dwIndex,
NULL, 0, &
type, provider, &providerLen);
571 ok(
count==provCount,
"expected %i, got %i\n", (
int)provCount, (
int)
count);
582 ok(
result && providerLen==cbName,
"expected %i, got %i\n", (
int)cbName, (
int)providerLen);
587 result = pCryptEnumProvidersA(dwIndex,
NULL, 0, &
type, provider, &providerLen);
589 ok(
type==dwType,
"expected %d, got %d\n", dwType,
type);
592 ok(cbName==providerLen,
"expected %d, got %d\n", cbName, providerLen);
596 result = pCryptEnumProvidersA(dwIndex,
NULL, 0, &
type, provider, &providerLen);
598 ok(
type==dwType,
"expected %d, got %d\n", dwType,
type);
601 ok(cbName==providerLen,
"expected %d, got %d\n", cbName, providerLen);
670 DWORD dwProvType = 0;
683 DWORD notZeroFlags = 5;
685 if(!pCryptEnumProviderTypesA)
687 win_skip(
"CryptEnumProviderTypesA is not available\n");
693 skip(
"Could not find provider types in registry\n");
698 result = pCryptEnumProviderTypesA(
index, ¬Null, 0, &provType, typeName, &typeNameSize);
703 result = pCryptEnumProviderTypesA(
index,
NULL, notZeroFlags, &provType, typeName, &typeNameSize);
713 typeNameSize = cbTypeName / 2;
718 result = pCryptEnumProviderTypesA(
index,
NULL, 0, &provType, typeName, &typeNameSize);
729 while(pCryptEnumProviderTypesA(typeCount++,
NULL, 0, &provType,
NULL, &typeNameSize))
732 ok(typeCount==dwTypeCount,
"expected %d, got %d\n", dwTypeCount, typeCount);
736 for (typeCount = 0; typeCount < dwTypeCount + 1; typeCount++)
737 result = pCryptEnumProviderTypesA(typeCount,
NULL, 0, &provType,
NULL, &typeNameSize);
743 ok(
result && typeNameSize==cbTypeName,
"expected %d, got %d\n", cbTypeName, typeNameSize);
747 typeNameSize = 0xdeadbeef;
748 result = pCryptEnumProviderTypesA(
index,
NULL, 0, &provType, typeName, &typeNameSize);
750 ok(provType==dwProvType,
"expected %d, got %d\n", dwProvType, provType);
752 ok(!
strcmp(pszTypeName, typeName),
"expected %s, got %s\n", pszTypeName, typeName);
753 ok(typeNameSize==cbTypeName,
"expected %d, got %d\n", cbTypeName, typeNameSize);
767 LPCSTR machinestr =
"Software\\Microsoft\\Cryptography\\Defaults\\Provider Types\\Type XXX";
768 LPCSTR userstr =
"Software\\Microsoft\\Cryptography\\Provider Type XXX";
775 *(--
ptr) = (dwProvType % 10) +
'0';
776 *(--
ptr) = ((dwProvType / 10) % 10) +
'0';
777 *(--
ptr) = (dwProvType / 100) +
'0';
826 if(!pCryptGetDefaultProviderA)
828 win_skip(
"CryptGetDefaultProviderA is not available\n");
834 skip(
"Could not find default provider in registry\n");
839 result = pCryptGetDefaultProviderA(provType, ¬Null,
flags, provName, &provNameSize);
845 result = pCryptGetDefaultProviderA(provType,
NULL,
flags, provName, &provNameSize);
851 provType = 0xdeadbeef;
852 result = pCryptGetDefaultProviderA(provType,
NULL,
flags, provName, &provNameSize);
855 "expected NTE_BAD_PROV_TYPE or ERROR_INVALID_PARAMETER, got %d/%d\n",
863 provNameSize = cbProvName / 2;
867 result = pCryptGetDefaultProviderA(provType,
NULL,
flags, provName, &provNameSize);
875 ok(
result && provNameSize==cbProvName,
"expected %d, got %d\n", cbProvName, provNameSize);
876 provNameSize = cbProvName;
881 provNameSize = 0xdeadbeef;
882 result = pCryptGetDefaultProviderA(provType,
NULL,
flags, provName, &provNameSize);
886 ok(provNameSize==cbProvName,
"expected %d, got %d\n", cbProvName, provNameSize);
903 if(!pCryptGetDefaultProviderA || !pCryptSetProviderExA)
905 win_skip(
"CryptGetDefaultProviderA and/or CryptSetProviderExA are not available\n");
928 skip(
"Not enough rights to remove the default provider\n");
957 char originalGuid[40];
968 skip(
"couldn't open HKLM\\Software\\Microsoft\\Cryptography\n");
972 size =
sizeof(originalGuid);
982 skip(
"broken virtualization on HKLM\\Software\\Microsoft\\Cryptography\n");
994 pCryptReleaseContext(hCryptProv, 0);
1002 #define key_length 16 1005 { 0xbf, 0xf6, 0x83, 0x4b, 0x3e, 0xa3, 0x23, 0xdd,
1006 0x96, 0x78, 0x70, 0x8e, 0xa1, 0x9d, 0x3b, 0x40 };
1014 BYTE key_data[2048];
1022 ret = pCryptAcquireContextA(&provider,
NULL,
NULL,
1029 key_blob.header.reserved = 0;
1030 key_blob.header.aiKeyAlg =
CALG_RC2;
1031 key_blob.key_size =
sizeof(
key);
1036 ret = pCryptImportKey(provider, (
BYTE*)&key_blob,
1045 pCryptDestroyKey(hkey);
1046 pCryptReleaseContext(provider, 0);
1058 ret = pCryptImportKey(provider, (
BYTE*)&key_blob,
1067 key_blob.key_size = 7;
1069 ret = pCryptImportKey(provider, (
BYTE*)&key_blob,
1077 pCryptDestroyKey(hkey);
1081 key_blob.key_size =
sizeof(
key);
1083 ret = pCryptImportKey(provider, (
BYTE*)&key_blob,
1091 pCryptDestroyKey(hkey);
1093 pCryptReleaseContext(provider, 0);
1096 key_blob.key_size =
sizeof(
key);
1098 ret = pCryptAcquireContextA(&provider,
NULL,
NULL,
1108 ret = pCryptImportKey(provider, (
BYTE*)&key_blob,
1115 pCryptDestroyKey(hkey);
1120 key_blob.key_size =
sizeof(key_blob.key_data);
1122 ret = pCryptImportKey(provider, (
BYTE*)&key_blob,
1129 pCryptDestroyKey(hkey);
1131 pCryptReleaseContext(provider, 0);
1140 char inString[] =
"Testdata for encryption";
1141 char keyString[] =
"EncryptionKey";
1142 unsigned char outBuffer[32];
1148 if (!pSystemFunction004)
1150 win_skip(
"SystemFunction004 is not available\n");
1156 inData.
Buffer = (
unsigned char *)inString;
1160 keyData.
Buffer = (
unsigned char *)keyString;
1166 Status = pSystemFunction004(&inData, &keyData, &outData);
1168 ok(outData.
Length == 32,
"Expected outData.Length to be 32, got %lu\n", outData.
Length);
1170 ok(outData.
Buffer ==
NULL,
"Expected outData.Length to be NULL, got %p\n", outData.
Buffer);
1172 outData.
Length =
sizeof(outBuffer);
1174 outData.
Buffer = outBuffer;
1176 Status = pSystemFunction004(&inData, &keyData, &outData);
1178 ok(outData.
Length == 32,
"Expected outData.Length to be 32, got %lu\n", outData.
Length);
1180 ok(outData.
Buffer !=
NULL,
"Expected outData.Buffer not to be NULL, got %p\n", outData.
Buffer);
1184 printf(
"outData.Buffer:\n");
1185 for (
i = 0;
i <
sizeof(outBuffer);
i++)
1186 printf(
"0x%02x ", outBuffer[
i]);
1197 unsigned char inBuffer[32] = {0xdc, 0xff, 0x05, 0x8d, 0xaf, 0xb6, 0xe2, 0x8c, 0x4f, 0xee, 0x00, 0x06, 0xac, 0x1d, 0x56, 0xf1,
1198 0x24, 0xbd, 0x17, 0xe0, 0xf6, 0xb8, 0x6d, 0x3a, 0x69, 0x5d, 0x14, 0xf9, 0x5a, 0x54, 0x93, 0xd1};
1199 char keyString[] =
"EncryptionKey";
1203 if (!pSystemFunction005)
1205 win_skip(
"SystemFunction005 is not available\n");
1209 inData.
Length =
sizeof(inBuffer);
1211 inData.
Buffer = inBuffer;
1215 keyData.
Buffer = (
unsigned char *)keyString;
1221 Status = pSystemFunction005(&inData, &keyData, &outData);
1223 ok(outData.
Length == 24,
"Expected outData.Length to be 24, got %lu\n", outData.
Length);
1225 ok(outData.
Buffer ==
NULL,
"Expected outData.Buffer to be NULL, got %p\n", outData.
Buffer);
1227 outData.
Length =
sizeof(outBuffer);
1229 outData.
Buffer = (
unsigned char *)outBuffer;
1231 Status = pSystemFunction005(&inData, &keyData, &outData);
1233 ok(outData.
Length == 24,
"Expected outData.Length to be 24, got %lu\n", outData.
Length);
1235 ok(outData.
Buffer !=
NULL,
"Expected outData.Buffer not to be NULL, got %p\n", outData.
Buffer);
1248 if (!pSystemFunction036)
1250 win_skip(
"SystemFunction036 is not available\n");
1254 ret = pSystemFunction036(
NULL, 0);
1255 ok(
ret ==
TRUE,
"Expected SystemFunction036 to return TRUE, got %d\n",
ret);
1261 ret = pSystemFunction036(
NULL, 5);
1265 ret = pSystemFunction036(&
test, 0);
1266 ok(
ret ==
TRUE,
"Expected SystemFunction036 to return TRUE, got %d\n",
ret);
1268 ret = pSystemFunction036(&
test,
sizeof(
int));
1269 ok(
ret ==
TRUE,
"Expected SystemFunction036 to return TRUE, got %d\n",
ret);
1289 ok(
len,
"expected len > 0\n");
1307 if (pCryptAcquireContextA && pCryptReleaseContext)
#define ERROR_INVALID_PARAMETER
static void test_SystemFunction036(void)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
static const BYTE privKey[]
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
_Reserved_ DWORD _In_ DWORD _Out_ DWORD * pdwProvType
static const char szBadKeySet[]
#define NTE_BAD_SIGNATURE
static void init_environment(void)
static void test_acquire_context(void)
#define CRYPT_IPSEC_HMAC_KEY
#define ERROR_NO_MORE_ITEMS
ACPI_SIZE strlen(const char *String)
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
GLdouble GLdouble GLdouble r
GLuint GLuint GLsizei count
#define HKEY_CURRENT_USER
static void init_function_pointers(void)
static void test_rc2_keylen(void)
static BYTE HCRYPTKEY *static LPCWSTR
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
GLuint GLuint GLsizei GLenum type
DWORD WINAPI GetLastError(VOID)
#define ERROR_ENVVAR_NOT_FOUND
#define NTE_KEYSET_ENTRY_BAD
#define STATUS_BUFFER_TOO_SMALL
static void test_get_default_provider(void)
#define PP_KEYSET_SEC_DESCR
#define NTE_PROV_TYPE_NOT_DEF
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
LONG WINAPI RegCloseKey(HKEY hKey)
static void test_enum_providers(void)
#define ERROR_ACCESS_DENIED
static void test_verify_sig(void)
static const char szRsaBaseProv[]
static void clean_up_environment(void)
static NTSTATUS(WINAPI *pSystemFunction004)(struct ustring *
#define ERROR_FILE_NOT_FOUND
_Reserved_ DWORD _In_ DWORD _Out_ DWORD _Out_writes_bytes_to_opt_ pcbTypeName LPSTR _Inout_ DWORD * pcbTypeName
static void test_container_sd(void)
#define ERROR_NOT_LOGGED_ON
static void test_enum_provider_types(void)
static struct ustring struct ustring *static struct ustring struct ustring *static BOOLEAN(WINAPI *pSystemFunction036)(PVOID
static const char szNonExistentProv[]
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_Reserved_ DWORD _In_ DWORD _Out_ DWORD _Out_writes_bytes_to_opt_ pcbProvName LPSTR _Inout_ DWORD * pcbProvName
#define ERROR_RING2_STACK_IN_USE
#define NTE_BAD_PROV_TYPE
static void test_SystemFunction004(void)
#define NTE_PROV_TYPE_NO_MATCH
_Reserved_ DWORD _In_ DWORD _Out_writes_bytes_to_opt_ pcbProvName LPSTR pszProvName
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define CRYPT_MACHINE_KEYSET
#define memcpy(s1, s2, n)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
#define NTE_KEYSET_NOT_DEF
#define CRYPT_VERIFYCONTEXT
#define CRYPT_USER_DEFAULT
static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvName, DWORD *pcbProvName, DWORD *pdwProvCount)
int WINAPI lstrlenA(LPCSTR lpString)
static BOOL FindDfltProvRegVals(DWORD dwProvType, DWORD dwFlags, LPSTR *pszProvName, DWORD *pcbProvName)
#define CRYPT_DELETE_DEFAULT
HLOCAL NTAPI LocalFree(HLOCAL hMem)
static void test_SystemFunction005(void)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
#define OWNER_SECURITY_INFORMATION
BOOL WINAPI CryptGetProvParam(HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
#define NON_DEF_PROV_TYPE
static struct ustring struct ustring *static struct ustring struct ustring *static ULONG
BOOL WINAPI CryptAcquireContextA(HCRYPTPROV *phProv, LPCSTR pszContainer, LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
BOOL WINAPI CryptReleaseContext(HCRYPTPROV hProv, ULONG_PTR dwFlags)
static const char szKeySet[]
#define CRYPT_DELETEKEYSET
static const WCHAR szName[]
char * strcpy(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
#define ERROR_CALL_NOT_IMPLEMENTED
char * cleanup(char *str)
#define GetProcAddress(x, y)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
static void test_set_provider_ex(void)
static BOOL FindProvTypesRegVals(DWORD *pdwIndex, DWORD *pdwProvType, LPSTR *pszTypeName, DWORD *pcbTypeName, DWORD *pdwTypeCount)
static const unsigned char key[key_length]
void user(int argc, const char *argv[])
#define HeapFree(x, y, z)
LONG WINAPI RegEnumKeyExA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
static void test_incorrect_api_usage(void)
static void test_machine_guid(void)
#define CRYPT_MACHINE_DEFAULT
static BYTE *static DWORD DWORD dwFlags
#define HKEY_LOCAL_MACHINE
#define NTE_BAD_HASH_STATE
#define NTE_PROV_TYPE_ENTRY_BAD
#define ERROR_INSUFFICIENT_BUFFER