Author: akhaldi
Date: Wed Apr 3 22:43:36 2013
New Revision: 58669
URL:
http://svn.reactos.org/svn/reactos?rev=58669&view=rev
Log:
[CRYPT32_WINETEST]
* Sync with Wine 1.5.26.
Modified:
trunk/rostests/winetests/crypt32/base64.c
trunk/rostests/winetests/crypt32/cert.c
trunk/rostests/winetests/crypt32/chain.c
trunk/rostests/winetests/crypt32/crl.c
trunk/rostests/winetests/crypt32/ctl.c
trunk/rostests/winetests/crypt32/encode.c
trunk/rostests/winetests/crypt32/main.c
trunk/rostests/winetests/crypt32/message.c
trunk/rostests/winetests/crypt32/msg.c
trunk/rostests/winetests/crypt32/object.c
trunk/rostests/winetests/crypt32/oid.c
trunk/rostests/winetests/crypt32/protectdata.c
trunk/rostests/winetests/crypt32/sip.c
trunk/rostests/winetests/crypt32/store.c
trunk/rostests/winetests/crypt32/str.c
trunk/rostests/winetests/crypt32/testlist.c
Modified: trunk/rostests/winetests/crypt32/base64.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/base64.…
==============================================================================
--- trunk/rostests/winetests/crypt32/base64.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/base64.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,14 +18,14 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
#define CERT_HEADER "-----BEGIN CERTIFICATE-----\r\n"
#define ALT_CERT_HEADER "-----BEGIN This is some arbitrary text that goes
on and on-----\r\n"
Modified: trunk/rostests/winetests/crypt32/cert.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/cert.c?…
==============================================================================
--- trunk/rostests/winetests/crypt32/cert.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/cert.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,16 +18,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winreg.h>
-#include <winerror.h>
+//#include <winreg.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#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);
@@ -1765,6 +1765,73 @@
DWORD size = 0;
BOOL ret;
+ if (!pCryptEncodeObjectEx)
+ {
+ win_skip("no CryptEncodeObjectEx support\n");
+ return;
+ }
+ ret = CryptVerifyCertificateSignature(0, 0, NULL, 0, NULL);
+ ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
+ "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
+ ret = CryptVerifyCertificateSignature(csp, 0, NULL, 0, NULL);
+ ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
+ "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
+ ret = CryptVerifyCertificateSignature(csp, X509_ASN_ENCODING, NULL, 0,
+ NULL);
+ ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD ||
+ GetLastError() == OSS_BAD_ARG),
+ "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError());
+ info.ToBeSigned.cbData = toBeSigned->cbData;
+ info.ToBeSigned.pbData = toBeSigned->pbData;
+ info.SignatureAlgorithm.pszObjId = (LPSTR)sigOID;
+ info.SignatureAlgorithm.Parameters.cbData = 0;
+ info.Signature.cbData = sigLen;
+ info.Signature.pbData = (BYTE *)sig;
+ info.Signature.cUnusedBits = 0;
+ ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, X509_CERT, &info,
+ CRYPT_ENCODE_ALLOC_FLAG, NULL, &cert, &size);
+ ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ if (cert)
+ {
+ PCERT_PUBLIC_KEY_INFO pubKeyInfo = NULL;
+ DWORD pubKeySize;
+
+ if (0)
+ {
+ /* Crashes prior to Vista */
+ ret = CryptVerifyCertificateSignature(csp, X509_ASN_ENCODING,
+ cert, size, NULL);
+ }
+ CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING,
+ (LPSTR)sigOID, 0, NULL, NULL, &pubKeySize);
+ pubKeyInfo = HeapAlloc(GetProcessHeap(), 0, pubKeySize);
+ if (pubKeyInfo)
+ {
+ ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE,
+ X509_ASN_ENCODING, (LPSTR)sigOID, 0, NULL, pubKeyInfo,
+ &pubKeySize);
+ ok(ret, "CryptExportKey failed: %08x\n", GetLastError());
+ if (ret)
+ {
+ ret = CryptVerifyCertificateSignature(csp, X509_ASN_ENCODING,
+ cert, size, pubKeyInfo);
+ ok(ret, "CryptVerifyCertificateSignature failed: %08x\n",
+ GetLastError());
+ }
+ HeapFree(GetProcessHeap(), 0, pubKeyInfo);
+ }
+ LocalFree(cert);
+ }
+}
+
+static void testVerifyCertSigEx(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned,
+ LPCSTR sigOID, const BYTE *sig, DWORD sigLen)
+{
+ CERT_SIGNED_CONTENT_INFO info;
+ LPBYTE cert = NULL;
+ DWORD size = 0;
+ BOOL ret;
+
if (!pCryptVerifyCertificateSignatureEx)
{
win_skip("no CryptVerifyCertificateSignatureEx support\n");
@@ -1875,6 +1942,7 @@
testSignCert(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, &sigSize);
testVerifyCertSig(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, sigSize);
+ testVerifyCertSigEx(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, sigSize);
CryptReleaseContext(csp, 0);
ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL,
@@ -2030,7 +2098,6 @@
if (context)
{
DWORD size = 0;
- PCRYPT_KEY_PROV_INFO info;
/* The context must have a key provider info property */
ret = CertGetCertificateContextProperty(context,
@@ -2038,24 +2105,25 @@
ok(ret && size, "Expected non-zero key provider info\n");
if (size)
{
- info = HeapAlloc(GetProcessHeap(), 0, size);
- if (info)
+ PCRYPT_KEY_PROV_INFO pInfo = HeapAlloc(GetProcessHeap(), 0, size);
+
+ if (pInfo)
{
ret = CertGetCertificateContextProperty(context,
- CERT_KEY_PROV_INFO_PROP_ID, info, &size);
+ CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size);
ok(ret, "CertGetCertificateContextProperty failed:
%08x\n",
GetLastError());
if (ret)
{
/* Sanity-check the key provider */
- ok(!lstrcmpW(info->pwszContainerName, cspNameW),
+ ok(!lstrcmpW(pInfo->pwszContainerName, cspNameW),
"Unexpected key container\n");
- ok(!lstrcmpW(info->pwszProvName, MS_DEF_PROV_W),
+ ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W),
"Unexpected provider\n");
- ok(info->dwKeySpec == AT_SIGNATURE,
- "Expected AT_SIGNATURE, got %d\n",
info->dwKeySpec);
+ ok(pInfo->dwKeySpec == AT_SIGNATURE,
+ "Expected AT_SIGNATURE, got %d\n",
pInfo->dwKeySpec);
}
- HeapFree(GetProcessHeap(), 0, info);
+ HeapFree(GetProcessHeap(), 0, pInfo);
}
}
@@ -2070,21 +2138,40 @@
CRYPT_DELETEKEYSET);
ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError());
-
- /* do the same test with AT_KEYEXCHANGE and key info*/
+ /* Do the same test with a CSP, AT_KEYEXCHANGE and key info */
+ pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL,
+ CRYPT_DELETEKEYSET);
+ ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL,
+ CRYPT_NEWKEYSET);
+ ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError());
+ ret = CryptGenKey(csp, AT_SIGNATURE, 0, &key);
+ ok(ret, "CryptGenKey failed: %08x\n", GetLastError());
+
memset(&info,0,sizeof(info));
info.dwProvType = PROV_RSA_FULL;
info.dwKeySpec = AT_KEYEXCHANGE;
info.pwszProvName = (LPWSTR) MS_DEF_PROV_W;
info.pwszContainerName = cspNameW;
- context = pCertCreateSelfSignCertificate(0, &name, 0, &info, NULL, NULL,
+ /* This should fail because the CSP doesn't have the specified key. */
+ SetLastError(0xdeadbeef);
+ context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL,
NULL, NULL);
- ok(context != NULL, "CertCreateSelfSignCertificate failed: %08x\n",
- GetLastError());
+ ok(context == NULL, "expected failure\n");
+ if (context != NULL)
+ CertFreeCertificateContext(context);
+ else
+ ok(GetLastError() == NTE_NO_KEY, "expected NTE_NO_KEY, got %08x\n",
+ GetLastError());
+ /* Again, with a CSP, AT_SIGNATURE and key info */
+ info.dwKeySpec = AT_SIGNATURE;
+ SetLastError(0xdeadbeef);
+ context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL,
+ NULL, NULL);
+ ok(context != NULL,
+ "CertCreateSelfSignCertificate failed: %08x\n", GetLastError());
if (context)
{
DWORD size = 0;
- PCRYPT_KEY_PROV_INFO info;
/* The context must have a key provider info property */
ret = CertGetCertificateContextProperty(context,
@@ -2092,32 +2179,159 @@
ok(ret && size, "Expected non-zero key provider info\n");
if (size)
{
- info = HeapAlloc(GetProcessHeap(), 0, size);
- if (info)
+ PCRYPT_KEY_PROV_INFO pInfo = HeapAlloc(GetProcessHeap(), 0, size);
+
+ if (pInfo)
{
ret = CertGetCertificateContextProperty(context,
- CERT_KEY_PROV_INFO_PROP_ID, info, &size);
+ CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size);
ok(ret, "CertGetCertificateContextProperty failed: %08x\n",
GetLastError());
if (ret)
{
/* Sanity-check the key provider */
- ok(!lstrcmpW(info->pwszContainerName, cspNameW),
+ ok(!lstrcmpW(pInfo->pwszContainerName, cspNameW),
"Unexpected key container\n");
- ok(!lstrcmpW(info->pwszProvName, MS_DEF_PROV_W),
+ ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W),
"Unexpected provider\n");
- ok(info->dwKeySpec == AT_KEYEXCHANGE,
- "Expected AT_KEYEXCHANGE, got %d\n",
info->dwKeySpec);
+ ok(pInfo->dwKeySpec == AT_SIGNATURE,
+ "Expected AT_SIGNATURE, got %d\n",
pInfo->dwKeySpec);
}
- HeapFree(GetProcessHeap(), 0, info);
+ HeapFree(GetProcessHeap(), 0, pInfo);
}
}
CertFreeCertificateContext(context);
}
+ CryptDestroyKey(key);
+
+ CryptReleaseContext(csp, 0);
+ ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL,
+ CRYPT_DELETEKEYSET);
+ ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError());
+
+ /* Do the same test with no CSP, AT_KEYEXCHANGE and key info */
+ info.dwKeySpec = AT_KEYEXCHANGE;
+ context = pCertCreateSelfSignCertificate(0, &name, 0, &info, NULL, NULL,
+ NULL, NULL);
+ ok(context != NULL, "CertCreateSelfSignCertificate failed: %08x\n",
+ GetLastError());
+ if (context)
+ {
+ DWORD size = 0;
+
+ /* The context must have a key provider info property */
+ ret = CertGetCertificateContextProperty(context,
+ CERT_KEY_PROV_INFO_PROP_ID, NULL, &size);
+ ok(ret && size, "Expected non-zero key provider info\n");
+ if (size)
+ {
+ PCRYPT_KEY_PROV_INFO pInfo = HeapAlloc(GetProcessHeap(), 0, size);
+
+ if (pInfo)
+ {
+ ret = CertGetCertificateContextProperty(context,
+ CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size);
+ ok(ret, "CertGetCertificateContextProperty failed: %08x\n",
+ GetLastError());
+ if (ret)
+ {
+ /* Sanity-check the key provider */
+ ok(!lstrcmpW(pInfo->pwszContainerName, cspNameW),
+ "Unexpected key container\n");
+ ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W),
+ "Unexpected provider\n");
+ ok(pInfo->dwKeySpec == AT_KEYEXCHANGE,
+ "Expected AT_KEYEXCHANGE, got %d\n",
pInfo->dwKeySpec);
+ }
+ HeapFree(GetProcessHeap(), 0, pInfo);
+ }
+ }
+
+ CertFreeCertificateContext(context);
+ }
pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL,
CRYPT_DELETEKEYSET);
+
+ /* Acquire a CSP and generate an AT_KEYEXCHANGE key in it. */
+ pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL,
+ CRYPT_DELETEKEYSET);
+ ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL,
+ CRYPT_NEWKEYSET);
+ ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError());
+
+ context = pCertCreateSelfSignCertificate(csp, &name, 0, NULL, NULL, NULL,
+ NULL, NULL);
+ ok(!context && GetLastError() == NTE_NO_KEY,
+ "Expected NTE_NO_KEY, got %08x\n", GetLastError());
+ ret = CryptGenKey(csp, AT_KEYEXCHANGE, 0, &key);
+ ok(ret, "CryptGenKey failed: %08x\n", GetLastError());
+
+ memset(&info,0,sizeof(info));
+ info.dwProvType = PROV_RSA_FULL;
+ info.dwKeySpec = AT_SIGNATURE;
+ info.pwszProvName = (LPWSTR) MS_DEF_PROV_W;
+ info.pwszContainerName = cspNameW;
+ /* This should fail because the CSP doesn't have the specified key. */
+ SetLastError(0xdeadbeef);
+ context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL,
+ NULL, NULL);
+ ok(context == NULL, "expected failure\n");
+ if (context != NULL)
+ CertFreeCertificateContext(context);
+ else
+ ok(GetLastError() == NTE_NO_KEY, "expected NTE_NO_KEY, got %08x\n",
+ GetLastError());
+ /* Again, with a CSP, AT_KEYEXCHANGE and key info. This succeeds because the
+ * CSP has an AT_KEYEXCHANGE key in it.
+ */
+ info.dwKeySpec = AT_KEYEXCHANGE;
+ SetLastError(0xdeadbeef);
+ context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL,
+ NULL, NULL);
+ ok(context != NULL,
+ "CertCreateSelfSignCertificate failed: %08x\n", GetLastError());
+ if (context)
+ {
+ DWORD size = 0;
+
+ /* The context must have a key provider info property */
+ ret = CertGetCertificateContextProperty(context,
+ CERT_KEY_PROV_INFO_PROP_ID, NULL, &size);
+ ok(ret && size, "Expected non-zero key provider info\n");
+ if (size)
+ {
+ PCRYPT_KEY_PROV_INFO pInfo = HeapAlloc(GetProcessHeap(), 0, size);
+
+ if (pInfo)
+ {
+ ret = CertGetCertificateContextProperty(context,
+ CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size);
+ ok(ret, "CertGetCertificateContextProperty failed: %08x\n",
+ GetLastError());
+ if (ret)
+ {
+ /* Sanity-check the key provider */
+ ok(!lstrcmpW(pInfo->pwszContainerName, cspNameW),
+ "Unexpected key container\n");
+ ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W),
+ "Unexpected provider\n");
+ ok(pInfo->dwKeySpec == AT_KEYEXCHANGE,
+ "Expected AT_KEYEXCHANGE, got %d\n",
pInfo->dwKeySpec);
+ }
+ HeapFree(GetProcessHeap(), 0, pInfo);
+ }
+ }
+
+ CertFreeCertificateContext(context);
+ }
+
+ CryptReleaseContext(csp, 0);
+ ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL,
+ CRYPT_DELETEKEYSET);
+ ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError());
+
}
static void testIntendedKeyUsage(void)
@@ -3253,6 +3467,11 @@
SetLastError(0xdeadbeef);
ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE,
1, (void **)certs, 0, NULL, &status);
+ if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND)
+ {
+ win_skip("CERT_CONTEXT_REVOCATION_TYPE unsupported, skipping\n");
+ return;
+ }
ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK,
"expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError());
ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK,
Modified: trunk/rostests/winetests/crypt32/chain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/chain.c…
==============================================================================
--- trunk/rostests/winetests/crypt32/chain.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/chain.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -19,15 +19,15 @@
*/
#include <stdio.h>
-#include <stdarg.h>
+//#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
#include <wininet.h>
-#include "wine/test.h"
+#include <wine/test.h>
static const BYTE selfSignedCert[] = {
0x30, 0x82, 0x01, 0x1f, 0x30, 0x81, 0xce, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02,
@@ -237,6 +237,223 @@
0xd1,0xbd,0xd7,0x95,0x22,0x43,0x7a,0x06,0x7b,0x4e,0xf6,0x37,0x8e,0xa2,0xb9,
0xcf,0x1f,0xa5,0xd2,0xbd,0x3b,0x04,0x97,0x39,0xb3,0x0f,0xfa,0x38,0xb5,0xaf,
0x55,0x20,0x88,0x60,0x93,0xf2,0xde,0xdb,0xff,0xdf };
+/* Battle.Net's cert */
+static const BYTE battlenet[] = {
+0x30,0x82,0x03,0xd8,0x30,0x82,0x02,0xc0,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
+0x1e,0x4c,0xc1,0xf1,0xac,0xbd,0xf3,0xf5,0x96,0x05,0xbd,0x5f,0xbb,0x3f,0x75,
+0x6b,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
+0x00,0x30,0x3c,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,
+0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x54,0x68,0x61,
+0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x16,0x30,0x14,0x06,0x03,
+0x55,0x04,0x03,0x13,0x0d,0x54,0x68,0x61,0x77,0x74,0x65,0x20,0x53,0x53,0x4c,
+0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x31,0x30,0x30,0x38,0x32,0x36,0x30,0x30,
+0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x31,0x32,0x30,0x39,0x32,0x34,0x32,0x33,
+0x35,0x39,0x35,0x39,0x5a,0x30,0x71,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,
+0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x08,0x0c,
+0x0a,0x43,0x61,0x6c,0x69,0x66,0x6f,0x72,0x6e,0x69,0x61,0x31,0x0f,0x30,0x0d,
+0x06,0x03,0x55,0x04,0x07,0x0c,0x06,0x49,0x72,0x76,0x69,0x6e,0x65,0x31,0x25,
+0x30,0x23,0x06,0x03,0x55,0x04,0x0a,0x0c,0x1c,0x42,0x6c,0x69,0x7a,0x7a,0x61,
+0x72,0x64,0x20,0x45,0x6e,0x74,0x65,0x72,0x74,0x61,0x69,0x6e,0x6d,0x65,0x6e,
+0x74,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,
+0x03,0x0c,0x0c,0x2a,0x2e,0x62,0x61,0x74,0x74,0x6c,0x65,0x2e,0x6e,0x65,0x74,
+0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
+0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,
+0x01,0x01,0x00,0xa8,0x27,0x24,0x42,0x24,0xc8,0xe4,0x4e,0xfa,0x12,0x53,0x78,
+0x14,0xa9,0xec,0x20,0x2d,0x79,0x07,0x55,0x36,0xad,0x04,0x8b,0xbc,0xd9,0x3b,
+0xcc,0x3e,0xae,0xa0,0x3b,0xa1,0x79,0xf9,0x03,0x20,0x3e,0xa6,0x6a,0xeb,0x8c,
+0xb1,0x45,0xcb,0x00,0x43,0x76,0x35,0x1b,0x3d,0xc9,0x4b,0xa9,0xc0,0xb6,0x32,
+0x88,0xaa,0x4c,0x2c,0x53,0xf8,0xc4,0xcf,0xee,0xee,0xef,0x28,0xdf,0x44,0xfa,
+0xa9,0x26,0xf6,0x99,0x7b,0xa4,0x7f,0xe8,0x5c,0x7f,0x59,0x51,0xe1,0x2c,0x57,
+0x2f,0x8f,0xb3,0xad,0x7b,0x88,0x50,0xbc,0x76,0xfe,0x03,0xbd,0xfd,0x11,0x5d,
+0x6e,0xbc,0x13,0x5b,0xd9,0x2e,0x38,0xc7,0x56,0x89,0x93,0x08,0xa2,0x24,0xbd,
+0x1d,0x48,0xd9,0x48,0xce,0x6e,0x12,0x4f,0x10,0x60,0x94,0x54,0xb7,0x6b,0x51,
+0xd0,0xdf,0x04,0xa8,0x16,0x39,0xcb,0xa5,0xd9,0xe7,0xb5,0xa9,0x02,0xfa,0xd3,
+0xca,0x52,0xe7,0xc8,0x45,0xf8,0x4d,0xbb,0x70,0x1a,0xfd,0xb3,0x7d,0x9c,0x77,
+0x8b,0x34,0xbe,0xd2,0xad,0xe7,0x17,0xb0,0x55,0xfa,0x1b,0x3e,0x51,0xcf,0x37,
+0xbd,0x29,0x94,0x9f,0x56,0x28,0xd1,0x9d,0xe5,0x56,0xce,0x78,0x61,0x6e,0x8b,
+0xae,0x95,0x44,0x3c,0xc8,0x54,0x48,0x78,0x1e,0x4c,0x72,0xff,0x0e,0xb9,0x14,
+0x78,0xdc,0x7c,0x2e,0x50,0x05,0xd9,0xd0,0xa5,0x97,0xf7,0xb9,0x45,0x3f,0x7e,
+0xdc,0xc6,0x4e,0x64,0x93,0x82,0xb7,0x97,0xcf,0xb1,0x7a,0x04,0xc1,0x1d,0x70,
+0xf8,0x6b,0x43,0xc4,0xd0,0xa7,0x03,0x4e,0xc9,0x14,0x90,0x4f,0x05,0xb5,0x11,
+0x36,0xc0,0xc2,0xbb,0x02,0x03,0x01,0x00,0x01,0xa3,0x81,0xa0,0x30,0x81,0x9d,
+0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30,
+0x3a,0x06,0x03,0x55,0x1d,0x1f,0x04,0x33,0x30,0x31,0x30,0x2f,0xa0,0x2d,0xa0,
+0x2b,0x86,0x29,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x76,0x72,0x2d,0x6f,
+0x76,0x2d,0x63,0x72,0x6c,0x2e,0x74,0x68,0x61,0x77,0x74,0x65,0x2e,0x63,0x6f,
+0x6d,0x2f,0x54,0x68,0x61,0x77,0x74,0x65,0x4f,0x56,0x2e,0x63,0x72,0x6c,0x30,
+0x1d,0x06,0x03,0x55,0x1d,0x25,0x04,0x16,0x30,0x14,0x06,0x08,0x2b,0x06,0x01,
+0x05,0x05,0x07,0x03,0x01,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,
+0x30,0x32,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x26,0x30,
+0x24,0x30,0x22,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x16,
+0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x74,0x68,0x61,
+0x77,0x74,0x65,0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,
+0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x5c,0x44,0xe2,
+0x2f,0x50,0x41,0xc8,0x54,0x0a,0xdd,0x2a,0xa2,0xa7,0x62,0x2d,0xc9,0xe8,0xa8,
+0xf7,0x53,0x14,0xe1,0x88,0x89,0x81,0x22,0x1b,0x82,0xb5,0xa1,0x75,0xcc,0x91,
+0x76,0x30,0x71,0xae,0x56,0x68,0xa9,0x75,0x65,0x7f,0xd8,0xc7,0xae,0x3b,0x68,
+0x66,0xd6,0x2d,0x92,0xb7,0x9b,0x28,0x59,0x98,0x89,0x29,0xf9,0x69,0xff,0xff,
+0xfa,0x4f,0x04,0x6b,0x96,0x78,0x1d,0xfe,0x67,0x78,0x33,0xd3,0xd5,0x91,0xee,
+0xa7,0x36,0xcd,0x86,0x4c,0xc6,0x08,0xf4,0x12,0x4b,0x2b,0xd2,0x95,0x6a,0x87,
+0xcd,0xe6,0x2d,0xf3,0xe0,0x8d,0x0c,0x77,0x9d,0xa0,0x2e,0xdc,0xf2,0xc1,0x06,
+0xc5,0xb0,0xd5,0xa0,0x00,0xe5,0x0e,0x53,0xad,0x04,0xc4,0xf6,0x6e,0x6b,0x7e,
+0x04,0xc2,0xea,0xaa,0xdf,0xe1,0x26,0x4a,0x14,0x33,0x03,0x77,0x15,0x5b,0x3e,
+0x41,0x22,0x5d,0xb7,0xaf,0x65,0x2f,0x46,0xbc,0x24,0xd7,0x30,0xe6,0x82,0x7d,
+0x2a,0x3b,0x81,0x04,0xa7,0xd5,0x0b,0x61,0x57,0xe0,0x91,0x04,0x6c,0xc6,0x08,
+0xbc,0xc0,0x1b,0x26,0x7f,0x69,0x22,0x69,0xd3,0x41,0x4c,0x9d,0x61,0xe0,0xfe,
+0x2b,0xd8,0x2e,0xe9,0x2d,0x72,0x30,0x68,0x81,0xa1,0x37,0x06,0xb5,0xdc,0xd3,
+0x48,0x65,0x16,0x74,0xfb,0x3c,0xb2,0x70,0xef,0x3d,0xee,0x63,0xea,0x62,0xf5,
+0xd2,0xc7,0x48,0x6a,0xb8,0x53,0xcb,0xbe,0x9a,0xeb,0xc1,0x77,0xfb,0x9b,0xec,
+0xb8,0x06,0x04,0xaa,0x23,0x2c,0x6d,0x17,0x9e,0xb9,0x6e,0xc9,0xa4,0xde,0x7e,
+0x61,0xc4,0xa7,0x45,0x68,0xf6,0x2a,0x57,0xaa,0xad,0xca,0x84,0x03 };
+static const BYTE thawte_primary_ca[] = {
+0x30,0x82,0x04,0x20,0x30,0x82,0x03,0x08,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
+0x34,0x4e,0xd5,0x57,0x20,0xd5,0xed,0xec,0x49,0xf4,0x2f,0xce,0x37,0xdb,0x2b,
+0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
+0x00,0x30,0x81,0xa9,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,
+0x55,0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x74,0x68,
+0x61,0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x28,0x30,0x26,0x06,
+0x03,0x55,0x04,0x0b,0x13,0x1f,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,
+0x74,0x69,0x6f,0x6e,0x20,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44,
+0x69,0x76,0x69,0x73,0x69,0x6f,0x6e,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,
+0x0b,0x13,0x2f,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x74,0x68,0x61,
+0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72,
+0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,
+0x20,0x6f,0x6e,0x6c,0x79,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,
+0x16,0x74,0x68,0x61,0x77,0x74,0x65,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,
+0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x36,0x31,
+0x31,0x31,0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x33,0x36,0x30,
+0x37,0x31,0x36,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xa9,0x31,0x0b,
+0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30,0x13,
+0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x74,0x68,0x61,0x77,0x74,0x65,0x2c,0x20,
+0x49,0x6e,0x63,0x2e,0x31,0x28,0x30,0x26,0x06,0x03,0x55,0x04,0x0b,0x13,0x1f,
+0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x53,
+0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44,0x69,0x76,0x69,0x73,0x69,0x6f,
+0x6e,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,0x0b,0x13,0x2f,0x28,0x63,0x29,
+0x20,0x32,0x30,0x30,0x36,0x20,0x74,0x68,0x61,0x77,0x74,0x65,0x2c,0x20,0x49,
+0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72,0x20,0x61,0x75,0x74,0x68,0x6f,
+0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6f,0x6e,0x6c,0x79,0x31,
+0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,0x16,0x74,0x68,0x61,0x77,0x74,
+0x65,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20,0x52,0x6f,0x6f,0x74,0x20,
+0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,
+0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,
+0x02,0x82,0x01,0x01,0x00,0xac,0xa0,0xf0,0xfb,0x80,0x59,0xd4,0x9c,0xc7,0xa4,
+0xcf,0x9d,0xa1,0x59,0x73,0x09,0x10,0x45,0x0c,0x0d,0x2c,0x6e,0x68,0xf1,0x6c,
+0x5b,0x48,0x68,0x49,0x59,0x37,0xfc,0x0b,0x33,0x19,0xc2,0x77,0x7f,0xcc,0x10,
+0x2d,0x95,0x34,0x1c,0xe6,0xeb,0x4d,0x09,0xa7,0x1c,0xd2,0xb8,0xc9,0x97,0x36,
+0x02,0xb7,0x89,0xd4,0x24,0x5f,0x06,0xc0,0xcc,0x44,0x94,0x94,0x8d,0x02,0x62,
+0x6f,0xeb,0x5a,0xdd,0x11,0x8d,0x28,0x9a,0x5c,0x84,0x90,0x10,0x7a,0x0d,0xbd,
+0x74,0x66,0x2f,0x6a,0x38,0xa0,0xe2,0xd5,0x54,0x44,0xeb,0x1d,0x07,0x9f,0x07,
+0xba,0x6f,0xee,0xe9,0xfd,0x4e,0x0b,0x29,0xf5,0x3e,0x84,0xa0,0x01,0xf1,0x9c,
+0xab,0xf8,0x1c,0x7e,0x89,0xa4,0xe8,0xa1,0xd8,0x71,0x65,0x0d,0xa3,0x51,0x7b,
+0xee,0xbc,0xd2,0x22,0x60,0x0d,0xb9,0x5b,0x9d,0xdf,0xba,0xfc,0x51,0x5b,0x0b,
+0xaf,0x98,0xb2,0xe9,0x2e,0xe9,0x04,0xe8,0x62,0x87,0xde,0x2b,0xc8,0xd7,0x4e,
+0xc1,0x4c,0x64,0x1e,0xdd,0xcf,0x87,0x58,0xba,0x4a,0x4f,0xca,0x68,0x07,0x1d,
+0x1c,0x9d,0x4a,0xc6,0xd5,0x2f,0x91,0xcc,0x7c,0x71,0x72,0x1c,0xc5,0xc0,0x67,
+0xeb,0x32,0xfd,0xc9,0x92,0x5c,0x94,0xda,0x85,0xc0,0x9b,0xbf,0x53,0x7d,0x2b,
+0x09,0xf4,0x8c,0x9d,0x91,0x1f,0x97,0x6a,0x52,0xcb,0xde,0x09,0x36,0xa4,0x77,
+0xd8,0x7b,0x87,0x50,0x44,0xd5,0x3e,0x6e,0x29,0x69,0xfb,0x39,0x49,0x26,0x1e,
+0x09,0xa5,0x80,0x7b,0x40,0x2d,0xeb,0xe8,0x27,0x85,0xc9,0xfe,0x61,0xfd,0x7e,
+0xe6,0x7c,0x97,0x1d,0xd5,0x9d,0x02,0x03,0x01,0x00,0x01,0xa3,0x42,0x30,0x40,
+0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x05,0x30,0x03,0x01,
+0x01,0xff,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,
+0x02,0x01,0x06,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x7b,
+0x5b,0x45,0xcf,0xaf,0xce,0xcb,0x7a,0xfd,0x31,0x92,0x1a,0x6a,0xb6,0xf3,0x46,
+0xeb,0x57,0x48,0x50,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
+0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x79,0x11,0xc0,0x4b,0xb3,0x91,
+0xb6,0xfc,0xf0,0xe9,0x67,0xd4,0x0d,0x6e,0x45,0xbe,0x55,0xe8,0x93,0xd2,0xce,
+0x03,0x3f,0xed,0xda,0x25,0xb0,0x1d,0x57,0xcb,0x1e,0x3a,0x76,0xa0,0x4c,0xec,
+0x50,0x76,0xe8,0x64,0x72,0x0c,0xa4,0xa9,0xf1,0xb8,0x8b,0xd6,0xd6,0x87,0x84,
+0xbb,0x32,0xe5,0x41,0x11,0xc0,0x77,0xd9,0xb3,0x60,0x9d,0xeb,0x1b,0xd5,0xd1,
+0x6e,0x44,0x44,0xa9,0xa6,0x01,0xec,0x55,0x62,0x1d,0x77,0xb8,0x5c,0x8e,0x48,
+0x49,0x7c,0x9c,0x3b,0x57,0x11,0xac,0xad,0x73,0x37,0x8e,0x2f,0x78,0x5c,0x90,
+0x68,0x47,0xd9,0x60,0x60,0xe6,0xfc,0x07,0x3d,0x22,0x20,0x17,0xc4,0xf7,0x16,
+0xe9,0xc4,0xd8,0x72,0xf9,0xc8,0x73,0x7c,0xdf,0x16,0x2f,0x15,0xa9,0x3e,0xfd,
+0x6a,0x27,0xb6,0xa1,0xeb,0x5a,0xba,0x98,0x1f,0xd5,0xe3,0x4d,0x64,0x0a,0x9d,
+0x13,0xc8,0x61,0xba,0xf5,0x39,0x1c,0x87,0xba,0xb8,0xbd,0x7b,0x22,0x7f,0xf6,
+0xfe,0xac,0x40,0x79,0xe5,0xac,0x10,0x6f,0x3d,0x8f,0x1b,0x79,0x76,0x8b,0xc4,
+0x37,0xb3,0x21,0x18,0x84,0xe5,0x36,0x00,0xeb,0x63,0x20,0x99,0xb9,0xe9,0xfe,
+0x33,0x04,0xbb,0x41,0xc8,0xc1,0x02,0xf9,0x44,0x63,0x20,0x9e,0x81,0xce,0x42,
+0xd3,0xd6,0x3f,0x2c,0x76,0xd3,0x63,0x9c,0x59,0xdd,0x8f,0xa6,0xe1,0x0e,0xa0,
+0x2e,0x41,0xf7,0x2e,0x95,0x47,0xcf,0xbc,0xfd,0x33,0xf3,0xf6,0x0b,0x61,0x7e,
+0x7e,0x91,0x2b,0x81,0x47,0xc2,0x27,0x30,0xee,0xa7,0x10,0x5d,0x37,0x8f,0x5c,
+0x39,0x2b,0xe4,0x04,0xf0,0x7b,0x8d,0x56,0x8c,0x68 };
+static const BYTE thawte_ssl_ca[] = {
+0x30,0x82,0x04,0x6c,0x30,0x82,0x03,0x54,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
+0x4d,0x5f,0x2c,0x34,0x08,0xb2,0x4c,0x20,0xcd,0x6d,0x50,0x7e,0x24,0x4d,0xc9,
+0xec,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
+0x00,0x30,0x81,0xa9,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,
+0x55,0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x74,0x68,
+0x61,0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x28,0x30,0x26,0x06,
+0x03,0x55,0x04,0x0b,0x13,0x1f,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,
+0x74,0x69,0x6f,0x6e,0x20,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44,
+0x69,0x76,0x69,0x73,0x69,0x6f,0x6e,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,
+0x0b,0x13,0x2f,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x74,0x68,0x61,
+0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72,
+0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,
+0x20,0x6f,0x6e,0x6c,0x79,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,
+0x16,0x74,0x68,0x61,0x77,0x74,0x65,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,
+0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x31,0x30,0x30,
+0x32,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x32,0x30,0x30,
+0x32,0x30,0x37,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x3c,0x31,0x0b,0x30,
+0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30,0x13,0x06,
+0x03,0x55,0x04,0x0a,0x13,0x0c,0x54,0x68,0x61,0x77,0x74,0x65,0x2c,0x20,0x49,
+0x6e,0x63,0x2e,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x03,0x13,0x0d,0x54,
+0x68,0x61,0x77,0x74,0x65,0x20,0x53,0x53,0x4c,0x20,0x43,0x41,0x30,0x82,0x01,
+0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,
+0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,
+0x99,0xe4,0x85,0x5b,0x76,0x49,0x7d,0x2f,0x05,0xd8,0xc5,0xac,0xc8,0xc8,0xa9,
+0xd3,0xdc,0x98,0xe6,0xd7,0x34,0xa6,0x2f,0x0c,0xf2,0x22,0x26,0xd8,0xa3,0xc9,
+0x14,0x4c,0x8f,0x05,0xa4,0x45,0xe8,0x14,0x0c,0x58,0x90,0x05,0x1a,0xb7,0xc5,
+0xc1,0x06,0xa5,0x80,0xaf,0xbb,0x1d,0x49,0x6b,0x52,0x34,0x88,0xc3,0x59,0xe7,
+0xef,0x6b,0xc4,0x27,0x41,0x8c,0x2b,0x66,0x1d,0xd0,0xe0,0xa3,0x97,0x98,0x19,
+0x34,0x4b,0x41,0xd5,0x98,0xd5,0xc7,0x05,0xad,0xa2,0xe4,0xd7,0xed,0x0c,0xad,
+0x4f,0xc1,0xb5,0xb0,0x21,0xfd,0x3e,0x50,0x53,0xb2,0xc4,0x90,0xd0,0xd4,0x30,
+0x67,0x6c,0x9a,0xf1,0x0e,0x74,0xc4,0xc2,0xdc,0x8a,0xe8,0x97,0xff,0xc9,0x92,
+0xae,0x01,0x8a,0x56,0x0a,0x98,0x32,0xb0,0x00,0x23,0xec,0x90,0x1a,0x60,0xc3,
+0xed,0xbb,0x3a,0xcb,0x0f,0x63,0x9f,0x0d,0x44,0xc9,0x52,0xe1,0x25,0x96,0xbf,
+0xed,0x50,0x95,0x89,0x7f,0x56,0x14,0xb1,0xb7,0x61,0x1d,0x1c,0x07,0x8c,0x3a,
+0x2c,0xf7,0xff,0x80,0xde,0x39,0x45,0xd5,0xaf,0x1a,0xd1,0x78,0xd8,0xc7,0x71,
+0x6a,0xa3,0x19,0xa7,0x32,0x50,0x21,0xe9,0xf2,0x0e,0xa1,0xc6,0x13,0x03,0x44,
+0x48,0xd1,0x66,0xa8,0x52,0x57,0xd7,0x11,0xb4,0x93,0x8b,0xe5,0x99,0x9f,0x5d,
+0xe7,0x78,0x51,0xe5,0x4d,0xf6,0xb7,0x59,0xb4,0x76,0xb5,0x09,0x37,0x4d,0x06,
+0x38,0x13,0x7a,0x1c,0x08,0x98,0x5c,0xc4,0x48,0x4a,0xcb,0x52,0xa0,0xa9,0xf8,
+0xb1,0x9d,0x8e,0x7b,0x79,0xb0,0x20,0x2f,0x3c,0x96,0xa8,0x11,0x62,0x47,0xbb,
+0x11,0x02,0x03,0x01,0x00,0x01,0xa3,0x81,0xfb,0x30,0x81,0xf8,0x30,0x32,0x06,
+0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x26,0x30,0x24,0x30,0x22,
+0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x16,0x68,0x74,0x74,
+0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x74,0x68,0x61,0x77,0x74,0x65,
+0x2e,0x63,0x6f,0x6d,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,
+0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x34,0x06,0x03,0x55,0x1d,
+0x1f,0x04,0x2d,0x30,0x2b,0x30,0x29,0xa0,0x27,0xa0,0x25,0x86,0x23,0x68,0x74,
+0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x74,0x68,0x61,0x77,0x74,0x65,
+0x2e,0x63,0x6f,0x6d,0x2f,0x54,0x68,0x61,0x77,0x74,0x65,0x50,0x43,0x41,0x2e,
+0x63,0x72,0x6c,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,
+0x03,0x02,0x01,0x06,0x30,0x28,0x06,0x03,0x55,0x1d,0x11,0x04,0x21,0x30,0x1f,
+0xa4,0x1d,0x30,0x1b,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x03,0x13,0x10,
+0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x4d,0x50,0x4b,0x49,0x2d,0x32,0x2d,
+0x39,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0xa7,0xa2,0x83,
+0xbb,0x34,0x45,0x40,0x3d,0xfc,0xd5,0x30,0x4f,0x12,0xb9,0x3e,0xa1,0x01,0x9f,
+0xf6,0xdb,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,
+0x7b,0x5b,0x45,0xcf,0xaf,0xce,0xcb,0x7a,0xfd,0x31,0x92,0x1a,0x6a,0xb6,0xf3,
+0x46,0xeb,0x57,0x48,0x50,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
+0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x80,0x22,0x80,0xe0,0x6c,
+0xc8,0x95,0x16,0xd7,0x57,0x26,0x87,0xf3,0x72,0x34,0xdb,0xc6,0x72,0x56,0x27,
+0x3e,0xd3,0x96,0xf6,0x2e,0x25,0x91,0xa5,0x3e,0x33,0x97,0xa7,0x4b,0xe5,0x2f,
+0xfb,0x25,0x7d,0x2f,0x07,0x61,0xfa,0x6f,0x83,0x74,0x4c,0x4c,0x53,0x72,0x20,
+0xa4,0x7a,0xcf,0x51,0x51,0x56,0x81,0x88,0xb0,0x6d,0x1f,0x36,0x2c,0xc8,0x2b,
+0xb1,0x88,0x99,0xc1,0xfe,0x44,0xab,0x48,0x51,0x7c,0xd8,0xf2,0x44,0x64,0x2a,
+0xd8,0x71,0xa7,0xfb,0x1a,0x2f,0xf9,0x19,0x8d,0x34,0xb2,0x23,0xbf,0xc4,0x4c,
+0x55,0x1d,0x8e,0x44,0xe8,0xaa,0x5d,0x9a,0xdd,0x9f,0xfd,0x03,0xc7,0xba,0x24,
+0x43,0x8d,0x2d,0x47,0x44,0xdb,0xf6,0xd8,0x98,0xc8,0xb2,0xf9,0xda,0xef,0xed,
+0x29,0x5c,0x69,0x12,0xfa,0xd1,0x23,0x96,0x0f,0xbf,0x9c,0x0d,0xf2,0x79,0x45,
+0x53,0x37,0x9a,0x56,0x2f,0xe8,0x57,0x10,0x70,0xf6,0xee,0x89,0x0c,0x49,0x89,
+0x9a,0xc1,0x23,0xf5,0xc2,0x2a,0xcc,0x41,0xcf,0x22,0xab,0x65,0x6e,0xb7,0x94,
+0x82,0x6d,0x2f,0x40,0x5f,0x58,0xde,0xeb,0x95,0x2b,0xa6,0x72,0x68,0x52,0x19,
+0x91,0x2a,0xae,0x75,0x9d,0x4e,0x92,0xe6,0xca,0xde,0x54,0xea,0x18,0xab,0x25,
+0x3c,0xe6,0x64,0xa6,0x79,0x1f,0x26,0x7d,0x61,0xed,0x7d,0xd2,0xe5,0x71,0x55,
+0xd8,0x93,0x17,0x7c,0x14,0x38,0x30,0x3c,0xdf,0x86,0xe3,0x4c,0xad,0x49,0xe3,
+0x97,0x59,0xce,0x1b,0x9b,0x2b,0xce,0xdc,0x65,0xd4,0x0b,0x28,0x6b,0x4e,0x84,
+0x46,0x51,0x44,0xf7,0x33,0x08,0x2d,0x58,0x97,0x21,0xae };
static const BYTE thawte_sgc_ca[] = {
0x30,0x82,0x03,0x23,0x30,0x82,0x02,0x8c,0xa0,0x03,0x02,0x01,0x02,0x02,0x04,
0x30,0x00,0x00,0x02,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
@@ -3095,6 +3312,11 @@
{ sizeof(googleElementStatus) / sizeof(googleElementStatus[0]),
googleElementStatus },
};
+static CONST_DATA_BLOB battlenetChain[] = {
+ { sizeof(thawte_primary_ca), thawte_primary_ca },
+ { sizeof(thawte_ssl_ca), thawte_ssl_ca },
+ { sizeof(battlenet), battlenet },
+};
/* The openssl cert is only valid from 9/12/2008 to 9/13/2012, so with the date
* tested (October 2007) it's not time valid.
*/
@@ -3449,6 +3671,8 @@
static SYSTEMTIME oct2007 = { 2007, 10, 1, 1, 0, 0, 0, 0 };
/* Wednesday, Oct 28, 2009 */
static SYSTEMTIME oct2009 = { 2009, 10, 3, 28, 0, 0, 0, 0 };
+/* Wednesday, Oct 28, 2010 */
+static SYSTEMTIME oct2010 = { 2010, 10, 3, 28, 0, 0, 0, 0 };
static void testGetCertChain(void)
{
@@ -3866,6 +4090,11 @@
static const ChainPolicyCheck stanfordPolicyCheckWithoutMatchingName = {
{ sizeof(stanfordChain) / sizeof(stanfordChain[0]), stanfordChain },
{ 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, &untrustedRootStatus, 0
+};
+
+static const ChainPolicyCheck nullTerminatedDomainComponentPolicyCheck = {
+ { sizeof(battlenetChain) / sizeof(battlenetChain[0]), battlenetChain },
+ { 0, 0, -1, -1, NULL}, &untrustedRootStatus, 0
};
static const ChainPolicyCheck invalidExtensionPolicyCheck = {
@@ -4165,6 +4394,8 @@
WCHAR winehq[] = {
'w','i','n','e','h','q','.','o','r','g',0
};
WCHAR google_dot_com[] = {
'w','w','w','.','g','o','o','g','l','e','.',
'c','o','m',0 };
+ WCHAR battle_dot_net[] = {
'w','w','w','.','b','a','t','t','l','e','.',
+ 'n','e','t',0 };
WCHAR a_dot_openssl_dot_org[] = {
'a','.','o','p','e','n','s','s','l','.',
'o','r','g',0 };
WCHAR openssl_dot_org[] = {
'o','p','e','n','s','s','l','.','o','r','g',0
};
@@ -4342,6 +4573,12 @@
sslPolicyPara.pwszServerName = afoo_dot_com;
CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
fooPolicyCheckWithoutMatchingName, &oct2007, &policyPara);
+ /* The
Battle.Net chain checks a certificate with a domain component
+ * containg a terminating NULL.
+ */
+ sslPolicyPara.pwszServerName = battle_dot_net;
+ CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
+ nullTerminatedDomainComponentPolicyCheck, &oct2010, &policyPara);
}
static void testVerifyCertChainPolicy(void)
@@ -4389,16 +4626,18 @@
ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, NULL,
&policyStatus);
ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n",
GetLastError());
- ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT,
- "Expected CERT_E_UNTRUSTEDROOT, got %08x\n", policyStatus.dwError);
+ ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT ||
+ policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */
+ "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n",
policyStatus.dwError);
ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0,
"Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex,
policyStatus.lElementIndex);
ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain,
&policyPara, &policyStatus);
ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n",
GetLastError());
- ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT,
- "Expected CERT_E_UNTRUSTEDROOT, got %08x\n", policyStatus.dwError);
+ ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT ||
+ policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */
+ "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n",
policyStatus.dwError);
ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0,
"Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex,
policyStatus.lElementIndex);
Modified: trunk/rostests/winetests/crypt32/crl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/crl.c?r…
==============================================================================
--- trunk/rostests/winetests/crypt32/crl.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/crl.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,16 +18,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winreg.h>
-#include <winerror.h>
+//#include <winreg.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06,
Modified: trunk/rostests/winetests/crypt32/ctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/ctl.c?r…
==============================================================================
--- trunk/rostests/winetests/crypt32/ctl.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/ctl.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,15 +18,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
static const BYTE emptyCTL[] = {
0x30,0x17,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,
Modified: trunk/rostests/winetests/crypt32/encode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/encode.…
==============================================================================
--- trunk/rostests/winetests/crypt32/encode.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/encode.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,13 +18,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
-#include <stdarg.h>
+//#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
static BOOL (WINAPI *pCryptDecodeObjectEx)(DWORD,LPCSTR,const
BYTE*,DWORD,DWORD,PCRYPT_DECODE_PARA,void*,DWORD*);
Modified: trunk/rostests/winetests/crypt32/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/main.c?…
==============================================================================
--- trunk/rostests/winetests/crypt32/main.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/main.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,15 +18,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
#include <winreg.h>
-#include "wine/test.h"
+#include <wine/test.h>
static HMODULE hCrypt;
@@ -181,12 +181,12 @@
/* Check with 0 NotBefore and NotAfter */
ret = CertVerifyTimeValidity(&fileTime, &info);
ok(ret == 1, "Expected 1, got %d\n", ret);
- memcpy(&info.NotAfter, &fileTime, sizeof(info.NotAfter));
+ info.NotAfter = fileTime;
/* Check with NotAfter equal to comparison time */
ret = CertVerifyTimeValidity(&fileTime, &info);
ok(ret == 0, "Expected 0, got %d\n", ret);
/* Check with NotBefore after comparison time */
- memcpy(&info.NotBefore, &fileTime, sizeof(info.NotBefore));
+ info.NotBefore = fileTime;
info.NotBefore.dwLowDateTime += 5000;
ret = CertVerifyTimeValidity(&fileTime, &info);
ok(ret == -1, "Expected -1, got %d\n", ret);
@@ -206,33 +206,22 @@
CryptMemFree(buf);
}
-typedef DWORD (WINAPI *I_CryptAllocTlsFunc)(void);
-typedef LPVOID (WINAPI *I_CryptDetachTlsFunc)(DWORD dwTlsIndex);
-typedef LPVOID (WINAPI *I_CryptGetTlsFunc)(DWORD dwTlsIndex);
-typedef BOOL (WINAPI *I_CryptSetTlsFunc)(DWORD dwTlsIndex, LPVOID lpTlsValue);
-typedef BOOL (WINAPI *I_CryptFreeTlsFunc)(DWORD dwTlsIndex, DWORD unknown);
-
-static I_CryptAllocTlsFunc pI_CryptAllocTls;
-static I_CryptDetachTlsFunc pI_CryptDetachTls;
-static I_CryptGetTlsFunc pI_CryptGetTls;
-static I_CryptSetTlsFunc pI_CryptSetTls;
-static I_CryptFreeTlsFunc pI_CryptFreeTls;
static void test_cryptTls(void)
{
+ DWORD (WINAPI *pI_CryptAllocTls)(void);
+ LPVOID (WINAPI *pI_CryptDetachTls)(DWORD dwTlsIndex);
+ LPVOID (WINAPI *pI_CryptGetTls)(DWORD dwTlsIndex);
+ BOOL (WINAPI *pI_CryptSetTls)(DWORD dwTlsIndex, LPVOID lpTlsValue);
+ BOOL (WINAPI *pI_CryptFreeTls)(DWORD dwTlsIndex, DWORD unknown);
DWORD index;
BOOL ret;
- pI_CryptAllocTls = (I_CryptAllocTlsFunc)GetProcAddress(hCrypt,
- "I_CryptAllocTls");
- pI_CryptDetachTls = (I_CryptDetachTlsFunc)GetProcAddress(hCrypt,
- "I_CryptDetachTls");
- pI_CryptGetTls = (I_CryptGetTlsFunc)GetProcAddress(hCrypt,
- "I_CryptGetTls");
- pI_CryptSetTls = (I_CryptSetTlsFunc)GetProcAddress(hCrypt,
- "I_CryptSetTls");
- pI_CryptFreeTls = (I_CryptFreeTlsFunc)GetProcAddress(hCrypt,
- "I_CryptFreeTls");
+ pI_CryptAllocTls = (void *)GetProcAddress(hCrypt, "I_CryptAllocTls");
+ pI_CryptDetachTls = (void *)GetProcAddress(hCrypt, "I_CryptDetachTls");
+ pI_CryptGetTls = (void *)GetProcAddress(hCrypt, "I_CryptGetTls");
+ pI_CryptSetTls = (void *)GetProcAddress(hCrypt, "I_CryptSetTls");
+ pI_CryptFreeTls = (void *)GetProcAddress(hCrypt, "I_CryptFreeTls");
/* One normal pass */
index = pI_CryptAllocTls();
@@ -277,16 +266,12 @@
}
}
-typedef BOOL (WINAPI *I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc)
- (LPCWSTR, DWORD *);
-
static void test_readTrustedPublisherDWORD(void)
{
- I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc pReadDWORD;
-
- pReadDWORD =
- (I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc)GetProcAddress(
- hCrypt, "I_CryptReadTrustedPublisherDWORDValueFromRegistry");
+
+ BOOL (WINAPI *pReadDWORD)(LPCWSTR, DWORD *);
+
+ pReadDWORD = (void *)GetProcAddress(hCrypt,
"I_CryptReadTrustedPublisherDWORDValueFromRegistry");
if (pReadDWORD)
{
static const WCHAR safer[] = {
@@ -320,15 +305,12 @@
}
}
-typedef HCRYPTPROV (WINAPI *I_CryptGetDefaultCryptProvFunc)(DWORD w);
-
static void test_getDefaultCryptProv(void)
{
- I_CryptGetDefaultCryptProvFunc pI_CryptGetDefaultCryptProv;
+ HCRYPTPROV (WINAPI *pI_CryptGetDefaultCryptProv)(DWORD w);
HCRYPTPROV prov;
- pI_CryptGetDefaultCryptProv = (I_CryptGetDefaultCryptProvFunc)
- GetProcAddress(hCrypt, "I_CryptGetDefaultCryptProv");
+ pI_CryptGetDefaultCryptProv = (void *)GetProcAddress(hCrypt,
"I_CryptGetDefaultCryptProv");
if (!pI_CryptGetDefaultCryptProv) return;
prov = pI_CryptGetDefaultCryptProv(0xdeadbeef);
@@ -345,14 +327,12 @@
CryptReleaseContext(prov, 0);
}
-typedef int (WINAPI *I_CryptInstallOssGlobal)(DWORD,DWORD,DWORD);
-
static void test_CryptInstallOssGlobal(void)
{
+ int (WINAPI *pI_CryptInstallOssGlobal)(DWORD,DWORD,DWORD);
int ret,i;
- I_CryptInstallOssGlobal pI_CryptInstallOssGlobal;
-
- pI_CryptInstallOssGlobal=
(I_CryptInstallOssGlobal)GetProcAddress(hCrypt,"I_CryptInstallOssGlobal");
+
+ pI_CryptInstallOssGlobal = (void
*)GetProcAddress(hCrypt,"I_CryptInstallOssGlobal");
/* passing in some random values to I_CryptInstallOssGlobal, it always returns 9 the
first time, then 10, 11 etc.*/
for(i=0;i<30;i++)
{
@@ -362,10 +342,6 @@
"Expected %d or 0, got %d\n",(9+i),ret);
}
}
-
-static BOOL (WINAPI *pCryptFormatObject)(DWORD dwEncoding, DWORD dwFormatType,
- DWORD dwFormatStrType, void *pFormatStruct, LPCSTR lpszStructType,
- const BYTE *pbEncoded, DWORD dwEncoded, void *pbFormat, DWORD *pcbFormat);
static const BYTE encodedInt[] = { 0x02,0x01,0x01 };
static const WCHAR encodedIntStr[] = { '0','2','
','0','1',' ','0','1',0 };
@@ -381,6 +357,10 @@
static void test_format_object(void)
{
+ BOOL (WINAPI *pCryptFormatObject)(DWORD dwEncoding, DWORD dwFormatType,
+ DWORD dwFormatStrType, void *pFormatStruct, LPCSTR lpszStructType,
+ const BYTE *pbEncoded, DWORD dwEncoded, void *pbFormat,
+ DWORD *pcbFormat);
BOOL ret;
DWORD size;
LPWSTR str;
Modified: trunk/rostests/winetests/crypt32/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/message…
==============================================================================
--- trunk/rostests/winetests/crypt32/message.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/message.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,14 +18,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
static BOOL (WINAPI * pCryptAcquireContextA)
(HCRYPTPROV *, LPCSTR, LPCSTR, DWORD, DWORD);
@@ -608,6 +608,7 @@
ret = CryptVerifyMessageSignature(¶, 0,
signedWithCertWithValidPubKeyContent,
sizeof(signedWithCertWithValidPubKeyContent), NULL, 0, NULL);
+ todo_wine
ok(!ret, "Expected failure\n");
/* Finally, a message signed with a valid public key verifies successfully
*/
Modified: trunk/rostests/winetests/crypt32/msg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/msg.c?r…
==============================================================================
--- trunk/rostests/winetests/crypt32/msg.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/msg.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,16 +18,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS
#define CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
static BOOL have_nt = TRUE;
static BOOL old_crypt32 = FALSE;
@@ -166,8 +166,6 @@
BOOL ret;
HCRYPTMSG msg;
DWORD size, i, value;
- CMSG_SIGNED_ENCODE_INFO signInfo = { sizeof(signInfo), 0 };
- CMSG_SIGNER_ENCODE_INFO signer = { sizeof(signer), 0 };
/* Crash
ret = CryptMsgGetParam(NULL, 0, 0, NULL, NULL);
Modified: trunk/rostests/winetests/crypt32/object.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/object.…
==============================================================================
--- trunk/rostests/winetests/crypt32/object.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/object.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -17,14 +17,14 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
static BOOL (WINAPI * pCryptQueryObject)(DWORD, const void *, DWORD, DWORD,
DWORD, DWORD *, DWORD *, DWORD *, HCERTSTORE *, HCRYPTMSG *, const void **);
Modified: trunk/rostests/winetests/crypt32/oid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/oid.c?r…
==============================================================================
--- trunk/rostests/winetests/crypt32/oid.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/oid.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,14 +18,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
-#include <stdarg.h>
+//#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
#include <winreg.h>
-#include "wine/test.h"
+#include <wine/test.h>
static BOOL (WINAPI *pCryptEnumOIDInfo)(DWORD,DWORD,void*,PFN_CRYPT_ENUM_OID_INFO);
Modified: trunk/rostests/winetests/crypt32/protectdata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/protect…
==============================================================================
--- trunk/rostests/winetests/crypt32/protectdata.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/protectdata.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -18,14 +18,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
static BOOL (WINAPI
*pCryptProtectData)(DATA_BLOB*,LPCWSTR,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*);
static BOOL (WINAPI
*pCryptUnprotectData)(DATA_BLOB*,LPWSTR*,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*);
Modified: trunk/rostests/winetests/crypt32/sip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/sip.c?r…
==============================================================================
--- trunk/rostests/winetests/crypt32/sip.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/sip.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -20,15 +20,15 @@
*/
#include <stdio.h>
-#include <stdarg.h>
+//#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <winnls.h>
#include <wincrypt.h>
#include <mssip.h>
-#include "wine/test.h"
+#include <wine/test.h>
static BOOL (WINAPI * funcCryptSIPGetSignedDataMsg)(SIP_SUBJECTINFO *,DWORD *,DWORD,DWORD
*,BYTE *);
static BOOL (WINAPI * funcCryptSIPPutSignedDataMsg)(SIP_SUBJECTINFO *,DWORD,DWORD
*,DWORD,BYTE *);
@@ -101,7 +101,7 @@
skip("Need admin rights\n");
return;
}
- ok ( ret, "CryptSIPAddProvider should have succeeded\n");
+ ok ( ret, "CryptSIPAddProvider should have succeeded, last error %d\n",
GetLastError());
/* Dummy provider will be deleted, but the function still fails because
* pwszIsFunctionName and pwszIsFunctionNameFmt2 are not present in the
@@ -132,12 +132,12 @@
newprov.pwszIsFunctionName = dummyfunction;
SetLastError(0xdeadbeef);
ret = CryptSIPAddProvider(&newprov);
- ok ( ret, "CryptSIPAddProvider should have succeeded\n");
+ ok ( ret, "CryptSIPAddProvider should have succeeded, last error %d\n",
GetLastError());
/* Dummy provider should be deleted */
SetLastError(0xdeadbeef);
ret = CryptSIPRemoveProvider(&actionid);
- ok ( ret, "CryptSIPRemoveProvider should have succeeded\n");
+ ok ( ret, "CryptSIPRemoveProvider should have succeeded, last error %d\n",
GetLastError());
}
static const BYTE cabFileData[] = {
Modified: trunk/rostests/winetests/crypt32/store.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/store.c…
==============================================================================
--- trunk/rostests/winetests/crypt32/store.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/store.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -19,15 +19,15 @@
*/
#include <stdio.h>
-#include <stdarg.h>
+//#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
/* The following aren't defined in wincrypt.h, as they're "reserved"
*/
#define CERT_CERT_PROP_ID 32
@@ -738,8 +738,6 @@
return ret;
}
-typedef DWORD (WINAPI *SHDeleteKeyAFunc)(HKEY, LPCSTR);
-
static void testRegStore(void)
{
static const char tempKey[] = "Software\\Wine\\CryptTemp";
@@ -1017,9 +1015,9 @@
*/
if (shlwapi)
{
- SHDeleteKeyAFunc pSHDeleteKeyA =
- (SHDeleteKeyAFunc)GetProcAddress(shlwapi, "SHDeleteKeyA");
-
+ DWORD (WINAPI *pSHDeleteKeyA)(HKEY, LPCSTR);
+
+ pSHDeleteKeyA = (void*)GetProcAddress(shlwapi,
"SHDeleteKeyA");
if (pSHDeleteKeyA)
pSHDeleteKeyA(HKEY_CURRENT_USER, tempKey);
FreeLibrary(shlwapi);
Modified: trunk/rostests/winetests/crypt32/str.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/str.c?r…
==============================================================================
--- trunk/rostests/winetests/crypt32/str.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/str.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -17,14 +17,14 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
+//#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
-#include <winerror.h>
+//#include <winerror.h>
#include <wincrypt.h>
-#include "wine/test.h"
+#include <wine/test.h>
typedef struct _CertRDNAttrEncoding {
LPCSTR pszObjId;
@@ -185,32 +185,22 @@
'e','a','p','o','l','i','s',';','
','S','=','M','i','n','n','e','s','o','t','a',
';',' ','C','=','U','S',0 };
-typedef BOOL (WINAPI *CryptDecodeObjectFunc)(DWORD, LPCSTR, const BYTE *,
- DWORD, DWORD, void *, DWORD *);
-typedef DWORD (WINAPI *CertNameToStrAFunc)(DWORD,LPVOID,DWORD,LPSTR,DWORD);
-typedef DWORD (WINAPI *CertNameToStrWFunc)(DWORD,LPVOID,DWORD,LPWSTR,DWORD);
-typedef DWORD (WINAPI *CertRDNValueToStrAFunc)(DWORD, PCERT_RDN_VALUE_BLOB,
+static HMODULE dll;
+static DWORD (WINAPI *pCertNameToStrA)(DWORD,LPVOID,DWORD,LPSTR,DWORD);
+static DWORD (WINAPI *pCertNameToStrW)(DWORD,LPVOID,DWORD,LPWSTR,DWORD);
+static DWORD (WINAPI *pCertRDNValueToStrA)(DWORD, PCERT_RDN_VALUE_BLOB,
LPSTR, DWORD);
-typedef DWORD (WINAPI *CertRDNValueToStrWFunc)(DWORD, PCERT_RDN_VALUE_BLOB,
+static DWORD (WINAPI *pCertRDNValueToStrW)(DWORD, PCERT_RDN_VALUE_BLOB,
LPWSTR, DWORD);
-typedef BOOL (WINAPI *CertStrToNameAFunc)(DWORD dwCertEncodingType,
+static BOOL (WINAPI *pCertStrToNameA)(DWORD dwCertEncodingType,
LPCSTR pszX500, DWORD dwStrType, void *pvReserved, BYTE *pbEncoded,
DWORD *pcbEncoded, LPCSTR *ppszError);
-typedef BOOL (WINAPI *CertStrToNameWFunc)(DWORD dwCertEncodingType,
+static BOOL (WINAPI *pCertStrToNameW)(DWORD dwCertEncodingType,
LPCWSTR pszX500, DWORD dwStrType, void *pvReserved, BYTE *pbEncoded,
DWORD *pcbEncoded, LPCWSTR *ppszError);
-typedef DWORD (WINAPI *CertGetNameStringAFunc)(PCCERT_CONTEXT cert, DWORD type,
+static DWORD (WINAPI *pCertGetNameStringA)(PCCERT_CONTEXT cert, DWORD type,
DWORD flags, void *typePara, LPSTR str, DWORD cch);
-static HMODULE dll;
-static CertNameToStrAFunc pCertNameToStrA;
-static CertNameToStrWFunc pCertNameToStrW;
-static CryptDecodeObjectFunc pCryptDecodeObject;
-static CertRDNValueToStrAFunc pCertRDNValueToStrA;
-static CertRDNValueToStrWFunc pCertRDNValueToStrW;
-static CertStrToNameAFunc pCertStrToNameA;
-static CertStrToNameWFunc pCertStrToNameW;
-static CertGetNameStringAFunc pCertGetNameStringA;
static void test_CertRDNValueToStrA(void)
{
@@ -1096,18 +1086,13 @@
{
dll = GetModuleHandleA("Crypt32.dll");
- pCertNameToStrA =
(CertNameToStrAFunc)GetProcAddress(dll,"CertNameToStrA");
- pCertNameToStrW =
(CertNameToStrWFunc)GetProcAddress(dll,"CertNameToStrW");
- pCertRDNValueToStrA = (CertRDNValueToStrAFunc)GetProcAddress(dll,
- "CertRDNValueToStrA");
- pCertRDNValueToStrW = (CertRDNValueToStrWFunc)GetProcAddress(dll,
- "CertRDNValueToStrW");
- pCryptDecodeObject = (CryptDecodeObjectFunc)GetProcAddress(dll,
- "CryptDecodeObject");
- pCertStrToNameA =
(CertStrToNameAFunc)GetProcAddress(dll,"CertStrToNameA");
- pCertStrToNameW =
(CertStrToNameWFunc)GetProcAddress(dll,"CertStrToNameW");
- pCertGetNameStringA = (CertGetNameStringAFunc)GetProcAddress(dll,
- "CertGetNameStringA");
+ pCertNameToStrA = (void*)GetProcAddress(dll,"CertNameToStrA");
+ pCertNameToStrW = (void*)GetProcAddress(dll,"CertNameToStrW");
+ pCertRDNValueToStrA = (void*)GetProcAddress(dll, "CertRDNValueToStrA");
+ pCertRDNValueToStrW = (void*)GetProcAddress(dll, "CertRDNValueToStrW");
+ pCertStrToNameA = (void*)GetProcAddress(dll,"CertStrToNameA");
+ pCertStrToNameW = (void*)GetProcAddress(dll,"CertStrToNameW");
+ pCertGetNameStringA = (void*)GetProcAddress(dll, "CertGetNameStringA");
test_CertRDNValueToStrA();
test_CertRDNValueToStrW();
Modified: trunk/rostests/winetests/crypt32/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/testlis…
==============================================================================
--- trunk/rostests/winetests/crypt32/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/testlist.c [iso-8859-1] Wed Apr 3 22:43:36 2013
@@ -1,10 +1,7 @@
/* Automatically generated file; DO NOT EDIT!! */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
#define STANDALONE
-#include "wine/test.h"
+#include <wine/test.h>
extern void func_base64(void);
extern void func_cert(void);