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
4127062a
Commit
4127062a
authored
Sep 29, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Oct 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Support querying the cipher strength of an SSL connection.
parent
302dd345
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
net.c
dlls/winhttp/net.c
+19
-0
session.c
dlls/winhttp/session.c
+2
-2
winhttp_private.h
dlls/winhttp/winhttp_private.h
+1
-0
No files found.
dlls/winhttp/net.c
View file @
4127062a
...
...
@@ -124,6 +124,8 @@ MAKE_FUNCPTR( SSL_get_ex_data_X509_STORE_CTX_idx );
MAKE_FUNCPTR
(
SSL_get_peer_certificate
);
MAKE_FUNCPTR
(
SSL_CTX_set_default_verify_paths
);
MAKE_FUNCPTR
(
SSL_CTX_set_verify
);
MAKE_FUNCPTR
(
SSL_get_current_cipher
);
MAKE_FUNCPTR
(
SSL_CIPHER_get_bits
);
MAKE_FUNCPTR
(
CRYPTO_num_locks
);
MAKE_FUNCPTR
(
CRYPTO_set_id_callback
);
...
...
@@ -464,6 +466,8 @@ BOOL netconn_init( netconn_t *conn, BOOL secure )
LOAD_FUNCPTR
(
SSL_get_peer_certificate
);
LOAD_FUNCPTR
(
SSL_CTX_set_default_verify_paths
);
LOAD_FUNCPTR
(
SSL_CTX_set_verify
);
LOAD_FUNCPTR
(
SSL_get_current_cipher
);
LOAD_FUNCPTR
(
SSL_CIPHER_get_bits
);
#undef LOAD_FUNCPTR
#define LOAD_FUNCPTR(x) \
...
...
@@ -1067,3 +1071,18 @@ const void *netconn_get_certificate( netconn_t *conn )
return
NULL
;
#endif
}
int
netconn_get_cipher_strength
(
netconn_t
*
conn
)
{
#ifdef SONAME_LIBSSL
SSL_CIPHER
*
cipher
;
int
bits
=
0
;
if
(
!
conn
->
secure
)
return
0
;
if
(
!
(
cipher
=
pSSL_get_current_cipher
(
conn
->
ssl_conn
)))
return
0
;
pSSL_CIPHER_get_bits
(
cipher
,
&
bits
);
return
bits
;
#else
return
0
;
#endif
}
dlls/winhttp/session.c
View file @
4127062a
...
...
@@ -641,7 +641,7 @@ static BOOL request_query_option( object_header_t *hdr, DWORD option, LPVOID buf
else
ci
->
lpszSignatureAlgName
=
NULL
;
ci
->
lpszEncryptionAlgName
=
NULL
;
ci
->
dwKeySize
=
128
;
ci
->
dwKeySize
=
netconn_get_cipher_strength
(
&
request
->
netconn
)
;
CertFreeCertificateContext
(
cert
);
*
buflen
=
sizeof
(
*
ci
);
...
...
@@ -656,7 +656,7 @@ static BOOL request_query_option( object_header_t *hdr, DWORD option, LPVOID buf
return
FALSE
;
}
*
(
DWORD
*
)
buffer
=
128
;
/* FIXME */
*
(
DWORD
*
)
buffer
=
netconn_get_cipher_strength
(
&
request
->
netconn
);
*
buflen
=
sizeof
(
DWORD
);
return
TRUE
;
}
...
...
dlls/winhttp/winhttp_private.h
View file @
4127062a
...
...
@@ -229,6 +229,7 @@ BOOL netconn_secure_connect( netconn_t *, WCHAR * );
BOOL
netconn_send
(
netconn_t
*
,
const
void
*
,
size_t
,
int
,
int
*
);
DWORD
netconn_set_timeout
(
netconn_t
*
,
BOOL
,
int
);
const
void
*
netconn_get_certificate
(
netconn_t
*
);
int
netconn_get_cipher_strength
(
netconn_t
*
);
BOOL
set_cookies
(
request_t
*
,
const
WCHAR
*
);
BOOL
add_cookie_headers
(
request_t
*
);
...
...
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