Simplify subkey usage for tgs-req, don't rewrite tgs-rep-sub-key keyuage for arcfour, its correct

This commit is contained in:
Love Hornquist Astrand
2009-11-15 17:56:07 -08:00
parent d6d4efe386
commit 316fc6ff8f
2 changed files with 7 additions and 13 deletions

View File

@@ -2386,7 +2386,6 @@ usage2arcfour (krb5_context context, unsigned *usage)
{
switch (*usage) {
case KRB5_KU_AS_REP_ENC_PART : /* 3 */
case KRB5_KU_TGS_REP_ENC_PART_SUB_KEY : /* 9 */
*usage = 8;
return 0;
case KRB5_KU_USAGE_SEAL : /* 22 */

View File

@@ -244,16 +244,12 @@ init_tgs_req (krb5_context context,
if(ret)
goto fail;
ret = krb5_generate_subkey_extended(context, &krbtgt->session,
ETYPE_NULL, &key);
ret = krb5_auth_con_generatelocalsubkey(context, ac, &krbtgt->session);
if (ret)
goto fail;
ret = krb5_auth_con_setlocalsubkey(context, ac, key);
if (ret)
goto fail;
ret = set_auth_data (context, &t->req_body, &in_creds->authdata, key);
ret = set_auth_data (context, &t->req_body, &in_creds->authdata,
ac->local_subkey);
if (ret)
goto fail;
@@ -265,12 +261,11 @@ init_tgs_req (krb5_context context,
if(ret)
goto fail;
*subkey = key;
key = NULL;
ret = krb5_auth_con_getlocalsubkey(context, ac, subkey);
if (ret)
goto fail;
fail:
if (key)
krb5_free_keyblock (context, key);
if (ac)
krb5_auth_con_free(context, ac);
if (ret) {