Jacek Caban : winhttp: Added schannel-based netconn_get_cipher_strength implementation.
Module: wine Branch: master Commit: 90124e084f75dc8705d8c7b41e5c4f0515e86736 URL: http://source.winehq.org/git/wine.git/?a=commit;h=90124e084f75dc8705d8c7b41e... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jan 23 15:50:17 2013 +0100 winhttp: Added schannel-based netconn_get_cipher_strength implementation. --- dlls/winhttp/net.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c index 2f1b8fe..af422b6 100644 --- a/dlls/winhttp/net.c +++ b/dlls/winhttp/net.c @@ -1467,6 +1467,13 @@ int netconn_get_cipher_strength( netconn_t *conn ) pSSL_CIPHER_get_bits( cipher, &bits ); return bits; #else - return 0; + SecPkgContext_ConnectionInfo conn_info; + SECURITY_STATUS res; + + if (!conn->secure) return 0; + res = QueryContextAttributesW(&conn->ssl_ctx, SECPKG_ATTR_CONNECTION_INFO, (void*)&conn_info); + if(res != SEC_E_OK) + WARN("QueryContextAttributesW failed: %08x\n", res); + return res == SEC_E_OK ? conn_info.dwCipherStrength : 0; #endif }
participants (1)
-
Alexandre Julliard