winhttp: Added schannel-based netconn_get_cipher_strength implementation.

This commit is contained in:
Jacek Caban 2013-01-23 15:50:17 +01:00 committed by Alexandre Julliard
parent d15265db28
commit 90124e084f
1 changed files with 8 additions and 1 deletions

View File

@ -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
}