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
2a569a9e
Commit
2a569a9e
authored
May 17, 2010
by
Juan Lang
Committed by
Alexandre Julliard
May 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Store a pointer to the netconn_t in the SSL context.
parent
7c7d00a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
net.c
dlls/winhttp/net.c
+15
-0
No files found.
dlls/winhttp/net.c
View file @
2a569a9e
...
...
@@ -95,6 +95,7 @@ static SSL_METHOD *method;
static
SSL_CTX
*
ctx
;
static
int
hostname_idx
;
static
int
error_idx
;
static
int
conn_idx
;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
...
...
@@ -485,6 +486,14 @@ BOOL netconn_init( netconn_t *conn, BOOL secure )
LeaveCriticalSection
(
&
init_ssl_cs
);
return
FALSE
;
}
conn_idx
=
pSSL_get_ex_new_index
(
0
,
(
void
*
)
"netconn index"
,
NULL
,
NULL
,
NULL
);
if
(
conn_idx
==
-
1
)
{
ERR
(
"SSL_get_ex_new_index failed: %s
\n
"
,
pERR_error_string
(
pERR_get_error
(),
0
));
set_last_error
(
ERROR_OUTOFMEMORY
);
LeaveCriticalSection
(
&
init_ssl_cs
);
return
FALSE
;
}
pSSL_CTX_set_verify
(
ctx
,
SSL_VERIFY_PEER
,
netconn_secure_verify
);
pCRYPTO_set_id_callback
(
ssl_thread_id
);
...
...
@@ -631,6 +640,12 @@ BOOL netconn_secure_connect( netconn_t *conn, WCHAR *hostname )
set_last_error
(
ERROR_WINHTTP_SECURE_CHANNEL_ERROR
);
goto
fail
;
}
if
(
!
pSSL_set_ex_data
(
conn
->
ssl_conn
,
conn_idx
,
conn
))
{
ERR
(
"SSL_set_ex_data failed: %s
\n
"
,
pERR_error_string
(
pERR_get_error
(),
0
));
set_last_error
(
ERROR_WINHTTP_SECURE_CHANNEL_ERROR
);
return
FALSE
;
}
if
(
!
pSSL_set_fd
(
conn
->
ssl_conn
,
conn
->
socket
))
{
ERR
(
"SSL_set_fd failed: %s
\n
"
,
pERR_error_string
(
pERR_get_error
(),
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