Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3e51313e
Commit
3e51313e
authored
Sep 28, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Sep 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Don't make use of OpenSSL's security checks, as crypt32 also verifies certificate chain.
parent
9387810d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
36 deletions
+30
-36
netconnection.c
dlls/wininet/netconnection.c
+30
-36
No files found.
dlls/wininet/netconnection.c
View file @
3e51313e
...
...
@@ -290,55 +290,49 @@ static int netconn_secure_verify(int preverify_ok, X509_STORE_CTX *ctx)
SSL
*
ssl
;
WCHAR
*
server
;
BOOL
ret
=
FALSE
;
HCERTSTORE
store
=
CertOpenStore
(
CERT_STORE_PROV_MEMORY
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
ssl
=
pX509_STORE_CTX_get_ex_data
(
ctx
,
pSSL_get_ex_data_X509_STORE_CTX_idx
());
server
=
pSSL_get_ex_data
(
ssl
,
hostname_idx
);
if
(
preverify_ok
)
if
(
store
)
{
HCERTSTORE
store
=
CertOpenStore
(
CERT_STORE_PROV_MEMORY
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
X509
*
cert
;
int
i
;
PCCERT_CONTEXT
endCert
=
NULL
;
if
(
store
)
ret
=
TRUE
;
for
(
i
=
0
;
ret
&&
i
<
psk_num
((
struct
stack_st
*
)
ctx
->
chain
);
i
++
)
{
X509
*
cert
;
int
i
;
PCCERT_CONTEXT
endCert
=
NULL
;
PCCERT_CONTEXT
context
;
ret
=
TRUE
;
for
(
i
=
0
;
ret
&&
i
<
psk_num
((
struct
stack_st
*
)
ctx
->
chain
);
i
++
)
cert
=
(
X509
*
)
psk_value
((
struct
stack_st
*
)
ctx
->
chain
,
i
)
;
if
((
context
=
X509_to_cert_context
(
cert
))
)
{
PCCERT_CONTEXT
context
;
cert
=
(
X509
*
)
psk_value
((
struct
stack_st
*
)
ctx
->
chain
,
i
);
if
((
context
=
X509_to_cert_context
(
cert
)))
{
if
(
i
==
0
)
ret
=
CertAddCertificateContextToStore
(
store
,
context
,
CERT_STORE_ADD_ALWAYS
,
&
endCert
);
else
ret
=
CertAddCertificateContextToStore
(
store
,
context
,
CERT_STORE_ADD_ALWAYS
,
NULL
);
CertFreeCertificateContext
(
context
);
}
if
(
i
==
0
)
ret
=
CertAddCertificateContextToStore
(
store
,
context
,
CERT_STORE_ADD_ALWAYS
,
&
endCert
);
else
ret
=
CertAddCertificateContextToStore
(
store
,
context
,
CERT_STORE_ADD_ALWAYS
,
NULL
);
CertFreeCertificateContext
(
context
);
}
if
(
!
endCert
)
ret
=
FALSE
;
if
(
ret
)
{
DWORD_PTR
err
=
netconn_verify_cert
(
endCert
,
store
,
server
);
}
if
(
!
endCert
)
ret
=
FALSE
;
if
(
ret
)
{
DWORD_PTR
err
=
netconn_verify_cert
(
endCert
,
store
,
server
);
if
(
err
)
{
pSSL_set_ex_data
(
ssl
,
error_idx
,
(
void
*
)
err
);
ret
=
FALSE
;
}
if
(
err
)
{
pSSL_set_ex_data
(
ssl
,
error_idx
,
(
void
*
)
err
);
ret
=
FALSE
;
}
CertFreeCertificateContext
(
endCert
);
CertCloseStore
(
store
,
0
);
}
}
else
pSSL_set_ex_data
(
ssl
,
error_idx
,
(
void
*
)
ERROR_INTERNET_SEC_CERT_ERRORS
);
CertFreeCertificateContext
(
endCert
);
CertCloseStore
(
store
,
0
);
}
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment