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
be8f2ae9
Commit
be8f2ae9
authored
Nov 12, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Dec 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Store hostname for secure connection in its SSL context.
parent
a33c4bfd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
net.c
dlls/winhttp/net.c
+9
-0
No files found.
dlls/winhttp/net.c
View file @
be8f2ae9
...
...
@@ -91,6 +91,7 @@ static void *libcrypto_handle;
static
SSL_METHOD
*
method
;
static
SSL_CTX
*
ctx
;
static
int
hostname_idx
;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
...
...
@@ -106,6 +107,9 @@ MAKE_FUNCPTR( SSL_connect );
MAKE_FUNCPTR
(
SSL_shutdown
);
MAKE_FUNCPTR
(
SSL_write
);
MAKE_FUNCPTR
(
SSL_read
);
MAKE_FUNCPTR
(
SSL_get_ex_new_index
);
MAKE_FUNCPTR
(
SSL_get_ex_data
);
MAKE_FUNCPTR
(
SSL_set_ex_data
);
MAKE_FUNCPTR
(
SSL_get_verify_result
);
MAKE_FUNCPTR
(
SSL_get_peer_certificate
);
MAKE_FUNCPTR
(
SSL_CTX_set_default_verify_paths
);
...
...
@@ -254,6 +258,9 @@ BOOL netconn_init( netconn_t *conn, BOOL secure )
LOAD_FUNCPTR
(
SSL_shutdown
);
LOAD_FUNCPTR
(
SSL_write
);
LOAD_FUNCPTR
(
SSL_read
);
LOAD_FUNCPTR
(
SSL_get_ex_new_index
);
LOAD_FUNCPTR
(
SSL_get_ex_data
);
LOAD_FUNCPTR
(
SSL_set_ex_data
);
LOAD_FUNCPTR
(
SSL_get_verify_result
);
LOAD_FUNCPTR
(
SSL_get_peer_certificate
);
LOAD_FUNCPTR
(
SSL_CTX_set_default_verify_paths
);
...
...
@@ -289,6 +296,7 @@ BOOL netconn_init( netconn_t *conn, BOOL secure )
LeaveCriticalSection
(
&
init_ssl_cs
);
return
FALSE
;
}
hostname_idx
=
pSSL_get_ex_new_index
(
0
,
(
void
*
)
"hostname index"
,
NULL
,
NULL
,
NULL
);
pCRYPTO_set_id_callback
(
ssl_thread_id
);
num_ssl_locks
=
pCRYPTO_num_locks
();
...
...
@@ -442,6 +450,7 @@ BOOL netconn_secure_connect( netconn_t *conn, WCHAR *hostname )
set_last_error
(
ERROR_WINHTTP_SECURE_CHANNEL_ERROR
);
goto
fail
;
}
pSSL_set_ex_data
(
conn
->
ssl_conn
,
hostname_idx
,
hostname
);
if
(
!
(
cert
=
pSSL_get_peer_certificate
(
conn
->
ssl_conn
)))
{
ERR
(
"No certificate for server: %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