secur32: Use schan_imp_get_connection_info to get MAC size.

This commit is contained in:
Ken Thomases 2011-03-13 18:57:29 -05:00 committed by Alexandre Julliard
parent f7e598cfc8
commit 842e0a5316
1 changed files with 17 additions and 12 deletions

View File

@ -1040,10 +1040,13 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
switch(attribute)
{
case SECPKG_ATTR_STREAM_SIZES:
{
SecPkgContext_ConnectionInfo info;
SECURITY_STATUS status = schan_imp_get_connection_info(ctx->session, &info);
if (status == SEC_E_OK)
{
SecPkgContext_StreamSizes *stream_sizes = buffer;
gnutls_mac_algorithm_t mac = pgnutls_mac_get(ctx->session);
size_t mac_size = pgnutls_mac_get_key_size(mac);
size_t mac_size = info.dwHashStrength;
unsigned int block_size = schan_imp_get_session_cipher_block_size(ctx->session);
TRACE("Using %zu mac bytes, block size %u\n", mac_size, block_size);
@ -1054,7 +1057,9 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
stream_sizes->cbMaximumMessage = 1 << 14;
stream_sizes->cbBuffers = 4;
stream_sizes->cbBlockSize = block_size;
return SEC_E_OK;
}
return status;
}
case SECPKG_ATTR_REMOTE_CERT_CONTEXT:
{