Ken Thomases : secur32: Extract schan_imp_get_session_cipher_block_size function.

Alexandre Julliard julliard at winehq.org
Mon Mar 14 14:29:43 CDT 2011


Module: wine
Branch: master
Commit: ccae072a3c303e1ff53416e6f4a8799de0489cd2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ccae072a3c303e1ff53416e6f4a8799de0489cd2

Author: Ken Thomases <ken at codeweavers.com>
Date:   Sun Mar 13 18:57:22 2011 -0500

secur32: Extract schan_imp_get_session_cipher_block_size function.

---

 dlls/secur32/schannel.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index 8739187..dd1858d 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -168,6 +168,12 @@ static ALG_ID schannel_get_kx_algid(gnutls_kx_algorithm_t kx)
     }
 }
 
+static unsigned int schan_imp_get_session_cipher_block_size(gnutls_session_t s)
+{
+    gnutls_cipher_algorithm_t cipher = pgnutls_cipher_get(s);
+    return schannel_get_cipher_block_size(cipher);
+}
+
 static SECURITY_STATUS schan_imp_get_session_peer_certificate(gnutls_session_t s,
                                                               PCCERT_CONTEXT *cert)
 {
@@ -1019,8 +1025,7 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
             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);
-            gnutls_cipher_algorithm_t cipher = pgnutls_cipher_get(ctx->session);
-            unsigned int block_size = schannel_get_cipher_block_size(cipher);
+            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);
 




More information about the wine-cvs mailing list