diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c index fa68591b160..b273e967d1e 100644 --- a/dlls/secur32/schannel_gnutls.c +++ b/dlls/secur32/schannel_gnutls.c @@ -309,9 +309,9 @@ SECURITY_STATUS schan_imp_get_connection_info(schan_imp_session session, info->dwProtocol = schannel_get_protocol(proto); info->aiCipher = schannel_get_cipher_algid(alg); - info->dwCipherStrength = pgnutls_cipher_get_key_size(alg); + info->dwCipherStrength = pgnutls_cipher_get_key_size(alg) * 8; info->aiHash = schannel_get_mac_algid(mac); - info->dwHashStrength = pgnutls_mac_get_key_size(mac); + info->dwHashStrength = pgnutls_mac_get_key_size(mac) * 8; info->aiExch = schannel_get_kx_algid(kx); /* FIXME: info->dwExchStrength? */ info->dwExchStrength = 0; diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c index ddcc87dd50c..7d4c5320f18 100644 --- a/dlls/secur32/tests/schannel.c +++ b/dlls/secur32/tests/schannel.c @@ -592,6 +592,7 @@ static void test_communication(void) CredHandle cred_handle; CtxtHandle context; SecPkgContext_StreamSizes sizes; + SecPkgContext_ConnectionInfo conn_info; CERT_CONTEXT *cert; SecBufferDesc buffers[2]; @@ -754,6 +755,13 @@ static void test_communication(void) pCertFreeCertificateContext(cert); } + status = pQueryContextAttributesA(&context, SECPKG_ATTR_CONNECTION_INFO, (void*)&conn_info); + ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_CONNECTION_INFO) failed: %08x\n", status); + if(status == SEC_E_OK) { + ok(conn_info.dwCipherStrength == 128, "conn_info.dwCipherStrength = %d\n", conn_info.dwCipherStrength); + ok(conn_info.dwHashStrength >= 128, "conn_info.dwHashStrength = %d\n", conn_info.dwHashStrength); + } + pQueryContextAttributesA(&context, SECPKG_ATTR_STREAM_SIZES, &sizes); reset_buffers(&buffers[0]);