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
1308c428
Commit
1308c428
authored
Dec 14, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Dec 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Return error directly from netconn_verify_cert.
parent
2f56ef09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
net.c
dlls/winhttp/net.c
+16
-10
No files found.
dlls/winhttp/net.c
View file @
1308c428
...
...
@@ -251,15 +251,15 @@ static PCCERT_CONTEXT X509_to_cert_context(X509 *cert)
return
ret
;
}
static
BOOL
netconn_verify_cert
(
PCCERT_CONTEXT
cert
,
HCERTSTORE
store
,
WCHAR
*
server
)
static
DWORD
netconn_verify_cert
(
PCCERT_CONTEXT
cert
,
HCERTSTORE
store
,
WCHAR
*
server
)
{
BOOL
ret
;
CERT_CHAIN_PARA
chainPara
=
{
sizeof
(
chainPara
),
{
0
}
};
PCCERT_CHAIN_CONTEXT
chain
;
char
oid_server_auth
[]
=
szOID_PKIX_KP_SERVER_AUTH
;
char
*
server_auth
[]
=
{
oid_server_auth
};
DWORD
err
;
DWORD
err
=
ERROR_SUCCESS
;
TRACE
(
"verifying %s
\n
"
,
debugstr_w
(
server
));
chainPara
.
RequestedUsage
.
Usage
.
cUsageIdentifier
=
1
;
...
...
@@ -286,8 +286,6 @@ static BOOL netconn_verify_cert( PCCERT_CONTEXT cert, HCERTSTORE store,
err
=
ERROR_WINHTTP_SECURE_CERT_WRONG_USAGE
;
else
err
=
ERROR_WINHTTP_SECURE_INVALID_CERT
;
set_last_error
(
err
);
ret
=
FALSE
;
}
else
{
...
...
@@ -313,14 +311,14 @@ static BOOL netconn_verify_cert( PCCERT_CONTEXT cert, HCERTSTORE store,
err
=
ERROR_WINHTTP_SECURE_CERT_CN_INVALID
;
else
err
=
ERROR_WINHTTP_SECURE_INVALID_CERT
;
set_last_error
(
err
);
ret
=
FALSE
;
}
}
CertFreeCertificateChain
(
chain
);
}
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
else
err
=
ERROR_WINHTTP_SECURE_CHANNEL_ERROR
;
TRACE
(
"returning %08x
\n
"
,
err
);
return
err
;
}
static
int
netconn_secure_verify
(
int
preverify_ok
,
X509_STORE_CTX
*
ctx
)
...
...
@@ -361,7 +359,15 @@ static int netconn_secure_verify( int preverify_ok, X509_STORE_CTX *ctx )
}
if
(
!
endCert
)
ret
=
FALSE
;
if
(
ret
)
ret
=
netconn_verify_cert
(
endCert
,
store
,
server
);
{
DWORD
err
=
netconn_verify_cert
(
endCert
,
store
,
server
);
if
(
err
)
{
set_last_error
(
err
);
ret
=
FALSE
;
}
}
CertFreeCertificateContext
(
endCert
);
CertCloseStore
(
store
,
0
);
}
...
...
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