(make_pa_tgs_req): remove old kludge for secd
(init_tgs_req): add all supported enctypes for the keytype in `in_creds->session.keytype' if it's set git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6050 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -85,30 +85,9 @@ make_pa_tgs_req(krb5_context context,
|
|||||||
|
|
||||||
in_data.length = len;
|
in_data.length = len;
|
||||||
in_data.data = buf + buf_size - len;
|
in_data.data = buf + buf_size - len;
|
||||||
{
|
ret = krb5_mk_req_internal(context, &ac, 0, &in_data, creds,
|
||||||
Ticket ticket;
|
&padata->padata_value,
|
||||||
ret = decode_Ticket(creds->ticket.data, creds->ticket.length,
|
KRB5_KU_TGS_REQ_AUTH_CKSUM);
|
||||||
&ticket, &len);
|
|
||||||
if(ret)
|
|
||||||
return ret;
|
|
||||||
/*
|
|
||||||
* If we get a ticket encrypted with DES-CBC-CRC, it's
|
|
||||||
* probably an old DCE secd and then the usual heuristics of
|
|
||||||
* using the best algorithm (in this case RSA-MD5 and
|
|
||||||
* DES-CBC-MD5) will not work.
|
|
||||||
*/
|
|
||||||
if(ticket.enc_part.etype == ETYPE_DES_CBC_CRC) {
|
|
||||||
krb5_auth_setcksumtype(context, ac, CKSUMTYPE_RSA_MD4);
|
|
||||||
krb5_auth_setenctype(context, ac, ETYPE_DES_CBC_CRC);
|
|
||||||
}
|
|
||||||
free_Ticket(&ticket);
|
|
||||||
|
|
||||||
|
|
||||||
ret = krb5_mk_req_internal(context, &ac, 0, &in_data, creds,
|
|
||||||
&padata->padata_value,
|
|
||||||
KRB5_KU_TGS_REQ_AUTH_CKSUM);
|
|
||||||
|
|
||||||
}
|
|
||||||
out:
|
out:
|
||||||
free (buf);
|
free (buf);
|
||||||
if(ret)
|
if(ret)
|
||||||
@@ -195,14 +174,10 @@ init_tgs_req (krb5_context context,
|
|||||||
t->pvno = 5;
|
t->pvno = 5;
|
||||||
t->msg_type = krb_tgs_req;
|
t->msg_type = krb_tgs_req;
|
||||||
if (in_creds->session.keytype) {
|
if (in_creds->session.keytype) {
|
||||||
krb5_enctype foo[2];
|
ret = krb5_keytype_to_enctypes (context,
|
||||||
|
in_creds->session.keytype,
|
||||||
foo[0] = in_creds->session.keytype;
|
&t->req_body.etype.len,
|
||||||
foo[1] = 0;
|
&t->req_body.etype.val);
|
||||||
ret = krb5_init_etype(context,
|
|
||||||
&t->req_body.etype.len,
|
|
||||||
&t->req_body.etype.val,
|
|
||||||
foo);
|
|
||||||
} else {
|
} else {
|
||||||
ret = krb5_init_etype(context,
|
ret = krb5_init_etype(context,
|
||||||
&t->req_body.etype.len,
|
&t->req_body.etype.len,
|
||||||
|
Reference in New Issue
Block a user