[jcifs] Will you review my patch to make jcifs-krb5-1.3.17 work on JDK 7, please?
Kiju Kim
kiju98 at gmail.com
Tue Jan 28 19:07:20 MST 2014
return ticket.getSessionKey(); is in searchSessionKey() method at line 68.
And the patch file is attached.
2014-01-28 Kiju Kim <kiju98 at gmail.com>:
> Hi,
>
> I've noticed KerbAuthExample in jcifs-krb5-1.3.17 doesn't work on JDK 7.
> It works fine on JDK 6 but produces "jcifs.smb.SmbAuthException:
> Access is denied." on JDK 7.
>
> I've learned that it is due to the change how JDK generates subKey
> (https://bugs.openjdk.java.net/browse/JDK-8031973).
>
> I prepared the following patch for Kerb5Context.java and saw
> KerbAuthExample worked fine on JDK 7.
> But I'm newt to jcifs and want my patch reviewed.
>
> < return ticket.getSessionKey();
> ---
>> com.sun.security.jgss.ExtendedGSSContext ec =
>> (com.sun.security.jgss.ExtendedGSSContext) gssContext;
>
>> return (Key) ec.inquireSecContext(
>> com.sun.security.jgss.InquireType.KRB5_GET_SESSION_KEY
> );
>> //return ticket.getSessionKey();
>
> Note that ExtendedGSSContext and InquireType are classes newly added in JDK 7.
> Also note that there is a small difference between the Key object
> returned by ticket.getSessionKey() and
> ec.inquireSecContext(KRB5_GET_SESSION_KEY) that their getAlgorithm()
> outputs are different. The former returns "DES" etc, but the later
> returns "1" etc. Looks like it doesn't affect the behavior of
> KerberosAuthExample but I'm not sure if getAlgorithm() is used
> elsewhere.
>
> Thanks and regards,
> Kiju
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 400 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20140129/55da7012/attachment.obj>
More information about the jCIFS
mailing list