Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bd5c5953
Commit
bd5c5953
authored
Dec 14, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Dec 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Return error directly from netconn_verify_cert.
parent
fb979081
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
netconnection.c
dlls/wininet/netconnection.c
+13
-9
No files found.
dlls/wininet/netconnection.c
View file @
bd5c5953
...
...
@@ -210,7 +210,7 @@ static PCCERT_CONTEXT X509_to_cert_context(X509 *cert)
return
ret
;
}
static
BOOL
netconn_verify_cert
(
PCCERT_CONTEXT
cert
,
HCERTSTORE
store
,
static
DWORD
netconn_verify_cert
(
PCCERT_CONTEXT
cert
,
HCERTSTORE
store
,
WCHAR
*
server
)
{
BOOL
ret
;
...
...
@@ -218,7 +218,7 @@ static BOOL netconn_verify_cert(PCCERT_CONTEXT cert, HCERTSTORE store,
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
;
...
...
@@ -245,8 +245,6 @@ static BOOL netconn_verify_cert(PCCERT_CONTEXT cert, HCERTSTORE store,
err
=
ERROR_INTERNET_SEC_INVALID_CERT
;
else
err
=
ERROR_INTERNET_SEC_INVALID_CERT
;
INTERNET_SetLastError
(
err
);
ret
=
FALSE
;
}
else
{
...
...
@@ -271,14 +269,12 @@ static BOOL netconn_verify_cert(PCCERT_CONTEXT cert, HCERTSTORE store,
err
=
ERROR_INTERNET_SEC_CERT_CN_INVALID
;
else
err
=
ERROR_INTERNET_SEC_INVALID_CERT
;
INTERNET_SetLastError
(
err
);
ret
=
FALSE
;
}
}
CertFreeCertificateChain
(
chain
);
}
TRACE
(
"returning %
d
\n
"
,
ret
);
return
ret
;
TRACE
(
"returning %
08x
\n
"
,
err
);
return
err
;
}
static
int
netconn_secure_verify
(
int
preverify_ok
,
X509_STORE_CTX
*
ctx
)
...
...
@@ -320,7 +316,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
)
{
INTERNET_SetLastError
(
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