Juan Lang : crypt32/tests: Add a test of SSL_EXTRA_CERT_CHAIN_POLICY_PARA' s fdwChecks field.
Alexandre Julliard
julliard at winehq.org
Mon Aug 16 12:25:06 CDT 2010
Module: wine
Branch: master
Commit: e922faec4ad1cd38a7354c13105217a5eab09ed8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e922faec4ad1cd38a7354c13105217a5eab09ed8
Author: Juan Lang <juan.lang at gmail.com>
Date: Thu Aug 12 11:25:29 2010 -0700
crypt32/tests: Add a test of SSL_EXTRA_CERT_CHAIN_POLICY_PARA's fdwChecks field.
---
dlls/crypt32/tests/chain.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
index a59a95a..1f7a11f 100644
--- a/dlls/crypt32/tests/chain.c
+++ b/dlls/crypt32/tests/chain.c
@@ -24,6 +24,7 @@
#include <winbase.h>
#include <winerror.h>
#include <wincrypt.h>
+#include <wininet.h>
#include "wine/test.h"
@@ -3821,6 +3822,11 @@ static const ChainPolicyCheck winehqPolicyCheckWithMatchingName = {
{ 0, 0, -1, -1, NULL}, NULL, 0
};
+static const ChainPolicyCheck winehqPolicyCheckWithIgnoredNonMatchingName = {
+ { sizeof(chain29) / sizeof(chain29[0]), chain29 },
+ { 0, 0, -1, -1, NULL}, NULL, TODO_ERROR
+};
+
static const ChainPolicyCheck winehqPolicyCheckWithoutMatchingName = {
{ sizeof(chain29) / sizeof(chain29[0]), chain29 },
{ 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, NULL, 0
@@ -4198,6 +4204,10 @@ static void check_ssl_policy(void)
sslPolicyPara.pwszServerName = a_dot_b_dot_winehq_dot_org;
checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, engine,
&winehqPolicyCheckWithoutMatchingName, 0, &oct2007, &policyPara);
+ /* When specifying to ignore name mismatch: match */
+ sslPolicyPara.fdwChecks |= SECURITY_FLAG_IGNORE_CERT_CN_INVALID;
+ checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, engine,
+ &winehqPolicyCheckWithIgnoredNonMatchingName, 0, &oct2007, &policyPara);
CertFreeCertificateChainEngine(engine);
CertCloseStore(testRoot, 0);
}
More information about the wine-cvs
mailing list