Received: from nwkea-mail-1.sun.com (nwkea-mail-1.sun.com [192.18.42.13]) by krbdev.mit.edu (8.9.3) with ESMTP id PAA29335; Thu, 4 Sep 2003 15:00:09 -0400 (EDT) Received: from phys-giza-1 ([129.147.4.102]) by nwkea-mail-1.sun.com (8.12.9/8.12.9) with ESMTP id h84Iw6v6017141 for ; Thu, 4 Sep 2003 11:59:33 -0700 (PDT) Received: from spock (vpn-129-147-153-193.Central.Sun.COM [129.147.153.193]) by giza-mail1.Central.Sun.COM (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with SMTP id <0HKP0091TE0EK0@giza-mail1.Central.Sun.COM> for rt-comment@krbdev.mit.edu; Thu, 04 Sep 2003 12:57:52 -0600 (MDT) Date: Thu, 04 Sep 2003 12:57:51 -0600 (MDT) From: Shawn Emery Subject: Re: [krbdev.mit.edu #1801] Exact match enctype To: Shawn.Emery@Sun.COM, rt-comment@krbdev.mit.edu Cc: krb5-prs@mit.edu Reply-To: Shawn Emery Message-Id: <0HKP0091VE0FK0@giza-mail1.Central.Sun.COM> MIME-Version: 1.0 X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.5.3_06 SunOS 5.9 sun4u sparc Content-Type: TEXT/plain; charset=us-ascii Content-Md5: 4YDKjQIu7XJU+VWqCdy+jg== RT-Send-Cc: X-RT-Original-Encoding: us-ascii Content-Length: 1397 > >>>>> "Shawn" == Shawn Emery via RT writes: > > Shawn> I found a problem to be that an exact match is performed > Shawn> between the enctype in the response to the enctype in the > Shawn> keytab file. In actuality a "similar" match should be > Shawn> performed when checking for encryption types. We've integrated > Shawn> this change into our source tree and I'm just checking to see > Shawn> if you would be interested in the diffs for this. > > That's odd... the situation you're describing shouldn't be happening. > lib/krb5/kt_file.c already performs a "similar" match, and coerces the > enctype of the key it returns if the match isn't exact. > > Do you have the following in your kt_file.c? Tom, You are right, our version of krb5_ktfile_get_entry() does not have the coercing that you speak of. Thanks for clearing this issue for me. Shawn. -- > if (enctype != IGNORE_ENCTYPE) { > if ((kerror = krb5_c_enctype_compare(context, enctype, > new_entry.key.enctype, > &similar))) { > krb5_kt_free_entry(context, &new_entry); > break; > } > > if (!similar) { > krb5_kt_free_entry(context, &new_entry); > continue; > } > /* > * Coerce the enctype of the output keyblock in case we > * got an inexact match on the enctype. > */ > new_entry.key.enctype = enctype; > > } Shawn. --