From 9012f55e7ca59b2a02f59376756438ef6a2d362c Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Wed, 4 Sep 2002 12:04:19 +0000 Subject: [PATCH] (init_tgs_req): use in_creds->session.keytype literally instead of trying to convert to a list of enctypes (it should already be an enctype) git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11366 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/get_cred.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/krb5/get_cred.c b/lib/krb5/get_cred.c index 7efd281d6..cd0ded56b 100644 --- a/lib/krb5/get_cred.c +++ b/lib/krb5/get_cred.c @@ -179,10 +179,13 @@ init_tgs_req (krb5_context context, t->pvno = 5; t->msg_type = krb_tgs_req; if (in_creds->session.keytype) { - ret = krb5_keytype_to_enctypes_default (context, - in_creds->session.keytype, - &t->req_body.etype.len, - &t->req_body.etype.val); + ALLOC_SEQ(&t->req_body.etype, 1); + if(t->req_body.etype.val == NULL) { + ret = ENOMEM; + krb5_set_error_string(context, "malloc: out of memory"); + goto fail; + } + t->req_body.etype.val[0] = in_creds->session.keytype; } else { ret = krb5_init_etype(context, &t->req_body.etype.len,