Commit 64c84ef5 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

secur32: Report SecPkgContext_ConnectionInfo in bits, not bytes.

parent 5f3c38ed
...@@ -309,9 +309,9 @@ SECURITY_STATUS schan_imp_get_connection_info(schan_imp_session session, ...@@ -309,9 +309,9 @@ SECURITY_STATUS schan_imp_get_connection_info(schan_imp_session session,
info->dwProtocol = schannel_get_protocol(proto); info->dwProtocol = schannel_get_protocol(proto);
info->aiCipher = schannel_get_cipher_algid(alg); 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->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); info->aiExch = schannel_get_kx_algid(kx);
/* FIXME: info->dwExchStrength? */ /* FIXME: info->dwExchStrength? */
info->dwExchStrength = 0; info->dwExchStrength = 0;
......
...@@ -592,6 +592,7 @@ static void test_communication(void) ...@@ -592,6 +592,7 @@ static void test_communication(void)
CredHandle cred_handle; CredHandle cred_handle;
CtxtHandle context; CtxtHandle context;
SecPkgContext_StreamSizes sizes; SecPkgContext_StreamSizes sizes;
SecPkgContext_ConnectionInfo conn_info;
CERT_CONTEXT *cert; CERT_CONTEXT *cert;
SecBufferDesc buffers[2]; SecBufferDesc buffers[2];
...@@ -754,6 +755,13 @@ static void test_communication(void) ...@@ -754,6 +755,13 @@ static void test_communication(void)
pCertFreeCertificateContext(cert); 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); pQueryContextAttributesA(&context, SECPKG_ATTR_STREAM_SIZES, &sizes);
reset_buffers(&buffers[0]); reset_buffers(&buffers[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment