Save session master key.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19444 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -153,6 +153,12 @@ handle_type3(OM_uint32 *minor_status,
|
|||||||
if (ret) goto out;
|
if (ret) goto out;
|
||||||
ret = krb5_ntlm_req_set_opaque(ctx->context, ctx->ntlm, &ctx->opaque);
|
ret = krb5_ntlm_req_set_opaque(ctx->context, ctx->ntlm, &ctx->opaque);
|
||||||
if (ret) goto out;
|
if (ret) goto out;
|
||||||
|
if (type3->sessionkey.length) {
|
||||||
|
ret = krb5_ntlm_req_set_session(ctx->context, ctx->ntlm,
|
||||||
|
type3->sessionkey.data,
|
||||||
|
type3->sessionkey.length);
|
||||||
|
if (ret) goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Verify with the KDC the type3 packet is ok
|
* Verify with the KDC the type3 packet is ok
|
||||||
@@ -169,6 +175,16 @@ handle_type3(OM_uint32 *minor_status,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = krb5_ntlm_rep_get_sessionkey(ctx->context,
|
||||||
|
ctx->ntlm,
|
||||||
|
&ctx->sessionkey);
|
||||||
|
if (ret == 0 && ctx->sessionkey.length == 16) {
|
||||||
|
ctx->status |= STATUS_SESSIONKEY;
|
||||||
|
RC4_set_key(&ctx->crypto.key,
|
||||||
|
ctx->sessionkey.length,
|
||||||
|
ctx->sessionkey.data);
|
||||||
|
}
|
||||||
|
|
||||||
return GSS_S_COMPLETE;
|
return GSS_S_COMPLETE;
|
||||||
out:
|
out:
|
||||||
*minor_status = ret;
|
*minor_status = ret;
|
||||||
|
Reference in New Issue
Block a user