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
905ede6c
Commit
905ede6c
authored
Apr 30, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use hostname stored in server_t in NETCON_secure_connect.
parent
d08f34cd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
20 deletions
+4
-20
http.c
dlls/wininet/http.c
+1
-1
internet.h
dlls/wininet/internet.h
+1
-1
netconnection.c
dlls/wininet/netconnection.c
+2
-18
No files found.
dlls/wininet/http.c
View file @
905ede6c
...
...
@@ -4616,7 +4616,7 @@ static DWORD open_http_connection(http_request_t *request, BOOL *reusing)
if
(
session
->
appInfo
->
proxy
)
res
=
HTTP_SecureProxyConnect
(
request
);
if
(
res
==
ERROR_SUCCESS
)
res
=
NETCON_secure_connect
(
request
->
netconn
,
session
->
hostName
);
res
=
NETCON_secure_connect
(
request
->
netconn
);
if
(
res
!=
ERROR_SUCCESS
)
{
WARN
(
"Couldn't connect securely to host
\n
"
);
...
...
dlls/wininet/internet.h
View file @
905ede6c
...
...
@@ -525,7 +525,7 @@ BOOL INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto, WCHAR *foundP
DWORD
create_netconn
(
BOOL
,
server_t
*
,
DWORD
,
DWORD
,
netconn_t
**
)
DECLSPEC_HIDDEN
;
void
free_netconn
(
netconn_t
*
)
DECLSPEC_HIDDEN
;
void
NETCON_unload
(
void
)
DECLSPEC_HIDDEN
;
DWORD
NETCON_secure_connect
(
netconn_t
*
connection
,
LPWSTR
hostname
)
DECLSPEC_HIDDEN
;
DWORD
NETCON_secure_connect
(
netconn_t
*
connection
)
DECLSPEC_HIDDEN
;
DWORD
NETCON_send
(
netconn_t
*
connection
,
const
void
*
msg
,
size_t
len
,
int
flags
,
int
*
sent
/* out */
)
DECLSPEC_HIDDEN
;
DWORD
NETCON_recv
(
netconn_t
*
connection
,
void
*
buf
,
size_t
len
,
int
flags
,
...
...
dlls/wininet/netconnection.c
View file @
905ede6c
...
...
@@ -114,7 +114,6 @@ static const SSL_METHOD *meth;
static
SSL_METHOD
*
meth
;
#endif
static
SSL_CTX
*
ctx
;
static
int
hostname_idx
;
static
int
error_idx
;
static
int
conn_idx
;
...
...
@@ -309,7 +308,6 @@ static DWORD netconn_verify_cert(PCCERT_CONTEXT cert, HCERTSTORE store,
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
);
...
...
@@ -317,7 +315,6 @@ static int netconn_secure_verify(int preverify_ok, X509_STORE_CTX *ctx)
ssl
=
pX509_STORE_CTX_get_ex_data
(
ctx
,
pSSL_get_ex_data_X509_STORE_CTX_idx
());
server
=
pSSL_get_ex_data
(
ssl
,
hostname_idx
);
conn
=
pSSL_get_ex_data
(
ssl
,
conn_idx
);
if
(
store
)
{
...
...
@@ -342,7 +339,7 @@ static int netconn_secure_verify(int preverify_ok, X509_STORE_CTX *ctx)
if
(
!
endCert
)
ret
=
FALSE
;
if
(
ret
)
{
DWORD_PTR
err
=
netconn_verify_cert
(
endCert
,
store
,
server
,
DWORD_PTR
err
=
netconn_verify_cert
(
endCert
,
store
,
conn
->
server
->
name
,
conn
->
security_flags
);
if
(
err
)
...
...
@@ -457,12 +454,6 @@ static DWORD init_openssl(void)
return
ERROR_OUTOFMEMORY
;
}
hostname_idx
=
pSSL_get_ex_new_index
(
0
,
(
void
*
)
"hostname index"
,
NULL
,
NULL
,
NULL
);
if
(
hostname_idx
==
-
1
)
{
ERR
(
"SSL_get_ex_new_index failed; %s
\n
"
,
pERR_error_string
(
pERR_get_error
(),
0
));
return
ERROR_OUTOFMEMORY
;
}
error_idx
=
pSSL_get_ex_new_index
(
0
,
(
void
*
)
"error index"
,
NULL
,
NULL
,
NULL
);
if
(
error_idx
==
-
1
)
{
ERR
(
"SSL_get_ex_new_index failed; %s
\n
"
,
pERR_error_string
(
pERR_get_error
(),
0
));
...
...
@@ -692,7 +683,7 @@ int sock_get_error( int err )
* NETCON_secure_connect
* Initiates a secure connection over an existing plaintext connection.
*/
DWORD
NETCON_secure_connect
(
netconn_t
*
connection
,
LPWSTR
hostname
)
DWORD
NETCON_secure_connect
(
netconn_t
*
connection
)
{
DWORD
res
=
ERROR_NOT_SUPPORTED
;
#ifdef SONAME_LIBSSL
...
...
@@ -721,13 +712,6 @@ DWORD NETCON_secure_connect(netconn_t *connection, LPWSTR hostname)
goto
fail
;
}
if
(
!
pSSL_set_ex_data
(
ssl_s
,
hostname_idx
,
hostname
))
{
ERR
(
"SSL_set_ex_data failed: %s
\n
"
,
pERR_error_string
(
pERR_get_error
(),
0
));
res
=
ERROR_INTERNET_SECURITY_CHANNEL_ERROR
;
goto
fail
;
}
if
(
!
pSSL_set_ex_data
(
ssl_s
,
conn_idx
,
connection
))
{
ERR
(
"SSL_set_ex_data failed: %s
\n
"
,
...
...
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