split RC4 send and recv keystreams

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19457 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-12-19 18:22:08 +00:00
parent 026563966f
commit 35dc0e94d1
3 changed files with 10 additions and 5 deletions

View File

@@ -180,7 +180,10 @@ handle_type3(OM_uint32 *minor_status,
&ctx->sessionkey);
if (ret == 0 && ctx->sessionkey.length == 16) {
ctx->status |= STATUS_SESSIONKEY;
RC4_set_key(&ctx->crypto.key,
RC4_set_key(&ctx->crypto_send.key,
ctx->sessionkey.length,
ctx->sessionkey.data);
RC4_set_key(&ctx->crypto_recv.key,
ctx->sessionkey.length,
ctx->sessionkey.data);
}

View File

@@ -217,7 +217,10 @@ _gss_ntlm_init_sec_context
}
ctx->status |= STATUS_SESSIONKEY;
RC4_set_key(&ctx->crypto.key,
RC4_set_key(&ctx->crypto_recv.key,
ctx->sessionkey.length,
ctx->sessionkey.data);
RC4_set_key(&ctx->crypto_send.key,
ctx->sessionkey.length,
ctx->sessionkey.data);

View File

@@ -73,10 +73,9 @@ typedef struct {
krb5_data sessionkey;
struct {
uint32_t send_seq;
uint32_t recv_seq;
uint32_t seq;
RC4_KEY key;
} crypto;
} crypto_send, crypto_recv;
} *ntlm_ctx;
typedef struct {